Skip to content

Commit fefab6c

Browse files
Translucent gesture bar (#1249)
* fix problem * put it on startup view instead * [BOT] Applying version. * [BOT] Applying format. * fix typo --------- Co-authored-by: clubapplets-server <1958869+clubapplets-server@users.noreply.github.com>
1 parent a2bb609 commit fefab6c

File tree

2 files changed

+34
-28
lines changed

2 files changed

+34
-28
lines changed
Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Flutter imports:
22
import 'package:flutter/material.dart';
3+
import 'package:flutter/services.dart';
34

45
// Package imports:
56
import 'package:flutter_svg/flutter_svg.dart';
@@ -15,35 +16,40 @@ class StartUpView extends StatelessWidget {
1516
const StartUpView({super.key});
1617

1718
@override
18-
Widget build(BuildContext context) => ViewModelBuilder<StartUpViewModel>.nonReactive(
19-
viewModelBuilder: () => StartUpViewModel(intl: AppIntl.of(context)!),
20-
onViewModelReady: (StartUpViewModel model) {
21-
model.handleStartUp();
22-
},
23-
builder: (context, model, child) => Scaffold(
24-
backgroundColor: context.theme.appColors.backgroundVibrant,
25-
body: SafeArea(
26-
minimum: const EdgeInsets.all(20),
27-
child: Center(
28-
child: Column(
29-
mainAxisAlignment: MainAxisAlignment.center,
30-
children: <Widget>[
31-
Hero(
32-
tag: 'ets_logo',
33-
child: SvgPicture.asset(
34-
"assets/images/ets_white_logo.svg",
35-
excludeFromSemantics: true,
36-
width: 90,
37-
height: 90,
38-
colorFilter: ColorFilter.mode(context.theme.appColors.loginAccent, BlendMode.srcIn),
19+
Widget build(BuildContext context) {
20+
// Make Android's gesture bar transparent on older versions of Android (it is now the default behavior)
21+
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent));
22+
23+
return ViewModelBuilder<StartUpViewModel>.nonReactive(
24+
viewModelBuilder: () => StartUpViewModel(intl: AppIntl.of(context)!),
25+
onViewModelReady: (StartUpViewModel model) {
26+
model.handleStartUp();
27+
},
28+
builder: (context, model, child) => Scaffold(
29+
backgroundColor: context.theme.appColors.backgroundVibrant,
30+
body: SafeArea(
31+
minimum: const EdgeInsets.all(20),
32+
child: Center(
33+
child: Column(
34+
mainAxisAlignment: MainAxisAlignment.center,
35+
children: <Widget>[
36+
Hero(
37+
tag: 'ets_logo',
38+
child: SvgPicture.asset(
39+
"assets/images/ets_white_logo.svg",
40+
excludeFromSemantics: true,
41+
width: 90,
42+
height: 90,
43+
colorFilter: ColorFilter.mode(context.theme.appColors.loginAccent, BlendMode.srcIn),
44+
),
3945
),
40-
),
41-
const SizedBox(height: 15),
42-
CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(AppPalette.grey.white)),
43-
],
46+
const SizedBox(height: 15),
47+
CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(AppPalette.grey.white)),
48+
],
49+
),
4450
),
4551
),
4652
),
47-
),
48-
);
53+
);
54+
}
4955
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: The 4th generation of ÉTSMobile, the main gateway between the Éco
55
# pub.dev using `pub publish`. This is preferred for private packages.
66
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77

8-
version: 4.59.10
8+
version: 4.59.11
99

1010
environment:
1111
sdk: '>=3.8.0 <4.0.0'

0 commit comments

Comments
 (0)