Skip to content

Commit b7ba289

Browse files
committed
Improve styling
1 parent 73ce6ba commit b7ba289

File tree

6 files changed

+183
-310
lines changed

6 files changed

+183
-310
lines changed

assets/img/bg_consent.webp

-235 KB
Binary file not shown.

integration_test/background_tracking_easily_disabled_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void main() {
4141
await tester.ensureVisible(acceptPrivacyPolicy);
4242
await tester.tap(acceptPrivacyPolicy);
4343

44-
final continueButton = find.byKey(ValueKey("style.button"));
44+
final continueButton = find.byKey(ValueKey("acceptTermsButton"));
4545
await waitForWidget(tester, continueButton);
4646
await tester.ensureVisible(continueButton);
4747
await tester.tap(continueButton);

lib/core/utils/style.dart

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -132,36 +132,6 @@ class Style {
132132
);
133133
}
134134

135-
static Widget outlinedButton(
136-
text,
137-
onPressed, {
138-
color,
139-
textColor,
140-
borderColor,
141-
elevation,
142-
Key? key,
143-
}) {
144-
return OutlinedButton(
145-
key: key,
146-
onPressed: onPressed,
147-
style: OutlinedButton.styleFrom(
148-
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
149-
padding: const EdgeInsets.symmetric(vertical: 14),
150-
foregroundColor: color ?? colorPrimary,
151-
side: BorderSide(color: borderColor ?? color ?? colorPrimary),
152-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)),
153-
),
154-
child: Text(
155-
text,
156-
style: TextStyle(
157-
color: textColor ?? color ?? colorPrimary,
158-
fontSize: 14,
159-
fontWeight: FontWeight.w500,
160-
),
161-
),
162-
);
163-
}
164-
165135
//TextFields
166136
static Widget textField(
167137
hint,
@@ -246,6 +216,4 @@ class Style {
246216
alignLabelWithHint: true,
247217
);
248218
}
249-
250-
static Widget get bottomOffset => SizedBox(height: 75);
251219
}

lib/features/onboarding/presentation/pages/location_consent_page.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ class LocationConsentPage extends StatelessWidget {
2424
child: Padding(
2525
padding: const EdgeInsets.all(16),
2626
child: Row(
27+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
28+
spacing: 16,
2729
children: [
2830
Expanded(
29-
child: Style.outlinedButton(
30-
MyLocalizations.of(context, "no_show_info"),
31-
() async => await onCompleted?.call(),
31+
flex: 1,
32+
child: OutlinedButton(
33+
child: Text(MyLocalizations.of(context, "no_show_info")),
34+
onPressed: () async => await onCompleted?.call(),
3235
key: const Key("rejectBackgroundTrackingBtn"),
3336
),
3437
),
35-
const SizedBox(width: 16),
3638
Expanded(
37-
child: Style.button(
38-
MyLocalizations.of(context, 'continue_txt'),
39-
() {
39+
flex: 2,
40+
child: FilledButton(
41+
onPressed: () {
4042
Navigator.push(
4143
context,
4244
MaterialPageRoute(
@@ -45,6 +47,7 @@ class LocationConsentPage extends StatelessWidget {
4547
),
4648
);
4749
},
50+
child: Text(MyLocalizations.of(context, 'continue_txt')),
4851
),
4952
),
5053
],

lib/features/onboarding/presentation/pages/location_info_consent_page.dart

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ class _LocationInfoConsentPageState extends State<LocationInfoConsentPage> {
5151
fontSize: 16,
5252
),
5353
),
54+
bottomNavigationBar: SafeArea(
55+
child: Padding(
56+
padding: const EdgeInsets.all(16),
57+
child: FilledButton(
58+
child: Text(
59+
MyLocalizations.of(context, 'turn_on_location_button'),
60+
),
61+
onPressed: _isLoading ? null : _handleButtonPressed,
62+
),
63+
),
64+
),
5465
body: SafeArea(
5566
child: Padding(
5667
padding: const EdgeInsets.all(16),
@@ -64,19 +75,6 @@ class _LocationInfoConsentPageState extends State<LocationInfoConsentPage> {
6475
color: theme.textTheme.bodyMedium?.color,
6576
),
6677
),
67-
SizedBox(
68-
width: double.infinity,
69-
child: ElevatedButton(
70-
style: ElevatedButton.styleFrom(
71-
backgroundColor: theme.primaryColorDark,
72-
foregroundColor: Colors.white,
73-
),
74-
child: Text(
75-
MyLocalizations.of(context, 'turn_on_location_button'),
76-
),
77-
onPressed: _isLoading ? null : _handleButtonPressed,
78-
),
79-
),
8078
],
8179
),
8280
),

0 commit comments

Comments
 (0)