Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit 55c417f

Browse files
committed
fix(ui): upgrade to [email protected]+1
1 parent 8bd3368 commit 55c417f

File tree

8 files changed

+66
-68
lines changed

8 files changed

+66
-68
lines changed

lib/widgets/ui/snackbar/snackbar.dart

+56-58
Original file line numberDiff line numberDiff line change
@@ -45,64 +45,62 @@ Future<void> showLunaSnackBar({
4545
bool showButton = false,
4646
String buttonText = 'view',
4747
Function? buttonOnPressed,
48-
}) async =>
49-
showFlash(
50-
context: LunaState.context,
51-
duration: duration ?? Duration(seconds: showButton ? 4 : 2),
52-
builder: (context, controller) => Flash(
53-
backgroundColor: Theme.of(context).primaryColor,
54-
controller: controller,
55-
boxShadows: [
56-
BoxShadow(
57-
blurRadius: LunaUI.DEFAULT_MARGIN_SIZE / 2,
58-
spreadRadius: LunaUI.DEFAULT_MARGIN_SIZE / 4,
59-
color: Colors.black.withOpacity(LunaUI.OPACITY_SPLASH / 2),
60-
),
61-
],
62-
horizontalDismissDirection: HorizontalDismissDirection.horizontal,
63-
margin: LunaUI.MARGIN_DEFAULT,
64-
behavior: FlashBehavior.floating,
65-
position: position,
48+
}) async {
49+
showFlash(
50+
context: LunaState.context,
51+
duration: duration ?? Duration(seconds: showButton ? 4 : 2),
52+
transitionDuration: const Duration(milliseconds: LunaUI.ANIMATION_SPEED),
53+
reverseTransitionDuration:
54+
const Duration(milliseconds: LunaUI.ANIMATION_SPEED),
55+
builder: (context, controller) => FlashBar(
56+
controller: controller,
57+
backgroundColor: Theme.of(context).primaryColor,
58+
behavior: FlashBehavior.floating,
59+
margin: LunaUI.MARGIN_DEFAULT,
60+
position: position,
61+
shape: RoundedRectangleBorder(
62+
side: BorderSide(
63+
color:
64+
LunaUI.shouldUseBorder ? LunaColours.white10 : Colors.transparent,
65+
),
6666
borderRadius: BorderRadius.circular(LunaUI.BORDER_RADIUS),
67-
borderColor:
68-
LunaUI.shouldUseBorder ? LunaColours.white10 : Colors.transparent,
69-
child: FlashBar(
70-
title: LunaText.title(
71-
text: title,
72-
maxLines: 4,
73-
overflow: TextOverflow.ellipsis,
74-
),
75-
content: LunaText.subtitle(
76-
text: message,
77-
maxLines: 8,
78-
overflow: TextOverflow.ellipsis,
79-
),
80-
shouldIconPulse: false,
81-
icon: Padding(
82-
child: LunaIconButton(
83-
icon: type.icon,
84-
color: type.color,
85-
),
86-
padding: const EdgeInsets.only(
87-
left: LunaUI.DEFAULT_MARGIN_SIZE / 2,
88-
),
89-
),
90-
primaryAction: showButton
91-
? TextButton(
92-
child: Text(
93-
buttonText.toUpperCase(),
94-
style: const TextStyle(
95-
fontWeight: LunaUI.FONT_WEIGHT_BOLD,
96-
color: LunaColours.accent,
97-
),
98-
),
99-
onPressed: () {
100-
HapticFeedback.lightImpact();
101-
controller.dismiss();
102-
buttonOnPressed!();
103-
},
104-
)
105-
: null,
67+
),
68+
title: LunaText.title(
69+
text: title,
70+
maxLines: 4,
71+
overflow: TextOverflow.ellipsis,
72+
),
73+
content: LunaText.subtitle(
74+
text: message,
75+
maxLines: 8,
76+
overflow: TextOverflow.ellipsis,
77+
),
78+
shouldIconPulse: false,
79+
icon: Padding(
80+
child: LunaIconButton(
81+
icon: type.icon,
82+
color: type.color,
83+
),
84+
padding: const EdgeInsets.only(
85+
left: LunaUI.DEFAULT_MARGIN_SIZE / 2,
10686
),
10787
),
108-
);
88+
primaryAction: showButton
89+
? TextButton(
90+
child: Text(
91+
buttonText.toUpperCase(),
92+
style: const TextStyle(
93+
fontWeight: LunaUI.FONT_WEIGHT_BOLD,
94+
color: LunaColours.accent,
95+
),
96+
),
97+
onPressed: () {
98+
HapticFeedback.lightImpact();
99+
controller.dismiss();
100+
buttonOnPressed!();
101+
},
102+
)
103+
: null,
104+
),
105+
);
106+
}

macos/Runner.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
isa = PBXProject;
204204
attributes = {
205205
LastSwiftUpdateCheck = 0920;
206-
LastUpgradeCheck = 1300;
206+
LastUpgradeCheck = 1430;
207207
ORGANIZATIONNAME = "";
208208
TargetAttributes = {
209209
33CC10EC2044A3C60003C045 = {

macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lunasea",
33
"description": "Self-Hosted Controller",
4-
"version": "10.2.5",
4+
"version": "10.2.6",
55
"private": true,
66
"scripts": {
77
"build:android": "flutter clean && flutter build apk --release",

pubspec.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ packages:
501501
dependency: "direct main"
502502
description:
503503
name: flash
504-
sha256: f110b161dc67e8cf78d3b7ed29a7ea9575a4f97c8725510c3b08b0a1fb3bbda8
504+
sha256: "0ec6c32deb839a8ead1ba17a3bb055996f00ea6631384f4705ac6a08dec8b16c"
505505
url: "https://pub.dev"
506506
source: hosted
507-
version: "2.0.5+1"
507+
version: "3.0.5+1"
508508
flutter:
509509
dependency: "direct main"
510510
description: flutter

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: lunasea
22
description: Self-Hosted Controller
3-
version: 10.2.5+1
3+
version: 10.2.6+1
44
publish_to: "none"
55
environment:
66
sdk: ">=3.0.0 <4.0.0"
@@ -23,7 +23,7 @@ dependencies:
2323
firebase_messaging: ^14.6.7
2424
firebase_storage: ^11.2.6
2525
fl_chart: ^0.63.0
26-
flash: ^2.0.5+1
26+
flash: ^3.0.5+1
2727
flutter_cache_manager: ^3.3.1
2828
flutter_spinkit: ^5.2.0
2929
go_router: ^10.1.0

snap/snapcraft.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: lunasea
2-
version: 10.2.5
2+
version: 10.2.6
33
confinement: strict
44
base: core18
55
# Required but managed manually via Snapcraft dashboard

0 commit comments

Comments
 (0)