Skip to content

Commit c62a5ee

Browse files
Merge pull request #626 from threefoldtech/development_cleanup_upgrade
Upgrade flutter version and fix deprecated colors
2 parents 8e8ff7f + 7db82ac commit c62a5ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+416
-360
lines changed

app/android/app/build_local

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
// compileSdkVersion flutter.compileSdkVersion
30-
compileSdkVersion 34
29+
compileSdkVersion flutter.compileSdkVersion
3130
ndkVersion flutter.ndkVersion
3231

3332
sourceSets {

app/android/app/build_production

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
// compileSdkVersion flutter.compileSdkVersion
30-
compileSdkVersion 34
29+
compileSdkVersion flutter.compileSdkVersion
3130
ndkVersion flutter.ndkVersion
3231

3332
sourceSets {

app/android/app/build_staging

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
// compileSdkVersion flutter.compileSdkVersion
30-
compileSdkVersion 34
29+
compileSdkVersion flutter.compileSdkVersion
3130
ndkVersion flutter.ndkVersion
3231

3332
sourceSets {

app/android/app/build_testing

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
// compileSdkVersion flutter.compileSdkVersion
30-
compileSdkVersion 34
29+
compileSdkVersion flutter.compileSdkVersion
3130
ndkVersion flutter.ndkVersion
3231

3332
sourceSets {

app/android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ org.gradle.configureondemand=true
55
android.useAndroidX=true
66
android.jetifier.ignorelist=bcprov-jdk15on
77
android.enableJetifier=true
8+
android.enableR8.fullMode=false
89
org.gradle.jvmargs=-Xmx1536M \
910
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
1011
--add-opens=java.base/java.lang=ALL-UNNAMED \

app/lib/main.dart

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ Future<void> main() async {
4343
ThemeMode initialThemeMode = ThemeMode.system;
4444

4545
ThemeProvider themeProvider = ThemeProvider(initialThemeMode);
46-
await themeProvider.loadTheme();
46+
await themeProvider.loadTheme();
4747

4848
runApp(
4949
MultiProvider(
5050
providers: [
51-
ChangeNotifierProvider(
52-
create: (context) => themeProvider),
53-
ChangeNotifierProvider(
54-
create: (context) => TermsAgreement()),
51+
ChangeNotifierProvider(create: (context) => themeProvider),
52+
ChangeNotifierProvider(create: (context) => TermsAgreement()),
5553
],
5654
child: MyApp(initDone: initDone, registered: registered),
5755
),
@@ -70,7 +68,7 @@ Future<void> setGlobalValues() async {
7068
}
7169

7270
class MyApp extends StatelessWidget {
73-
const MyApp({
71+
const MyApp({
7472
super.key,
7573
required this.initDone,
7674
this.doubleName,
@@ -108,7 +106,7 @@ class MyApp extends StatelessWidget {
108106
foregroundColor: kColorScheme.onPrimary,
109107
),
110108
cardTheme: const CardTheme().copyWith(
111-
color: kColorScheme.secondaryContainer,
109+
color: kColorScheme.surfaceContainer,
112110
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8)),
113111
elevatedButtonTheme: ElevatedButtonThemeData(
114112
style: ElevatedButton.styleFrom(
@@ -118,7 +116,7 @@ class MyApp extends StatelessWidget {
118116
),
119117
expansionTileTheme: const ExpansionTileThemeData().copyWith(
120118
backgroundColor: kColorScheme.backgroundDarker,
121-
collapsedBackgroundColor: ThemeData().colorScheme.background),
119+
collapsedBackgroundColor: ThemeData().colorScheme.surface),
122120
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
123121
selectedItemColor: kColorScheme.primary,
124122
unselectedItemColor: kColorScheme.secondary,
@@ -134,7 +132,7 @@ class MyApp extends StatelessWidget {
134132
foregroundColor: kDarkColorScheme.onPrimaryContainer,
135133
),
136134
cardTheme: const CardTheme().copyWith(
137-
color: kDarkColorScheme.secondaryContainer,
135+
color: kDarkColorScheme.surfaceContainer,
138136
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8)),
139137
elevatedButtonTheme: ElevatedButtonThemeData(
140138
style: ElevatedButton.styleFrom(
@@ -144,15 +142,14 @@ class MyApp extends StatelessWidget {
144142
),
145143
expansionTileTheme: const ExpansionTileThemeData().copyWith(
146144
backgroundColor: kDarkColorScheme.backgroundDarker,
147-
collapsedBackgroundColor: kDarkColorScheme.background),
145+
collapsedBackgroundColor: kDarkColorScheme.surface),
148146
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
149147
selectedItemColor: kDarkColorScheme.primary,
150148
unselectedItemColor: kDarkColorScheme.secondary,
151149
),
152150
),
153151
themeMode: themeProvider.themeMode,
154-
home: SplashScreen(
155-
initDone: initDone, registered: registered),
152+
home: SplashScreen(initDone: initDone, registered: registered),
156153
);
157154
}
158155
}

app/lib/screens/dao_screen.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class _DaoPageState extends State<DaoPage> {
6666
Text(
6767
'Loading Proposals...',
6868
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
69-
color: Theme.of(context).colorScheme.onBackground,
69+
color: Theme.of(context).colorScheme.onSurface,
7070
fontWeight: FontWeight.bold),
7171
),
7272
],
@@ -83,8 +83,7 @@ class _DaoPageState extends State<DaoPage> {
8383
child: TabBar(
8484
labelColor: Theme.of(context).colorScheme.primary,
8585
indicatorColor: Theme.of(context).colorScheme.primary,
86-
unselectedLabelColor:
87-
Theme.of(context).colorScheme.onBackground,
86+
unselectedLabelColor: Theme.of(context).colorScheme.onSurface,
8887
dividerColor: Theme.of(context).scaffoldBackgroundColor,
8988
labelStyle: Theme.of(context).textTheme.titleLarge,
9089
unselectedLabelStyle: Theme.of(context).textTheme.titleMedium,

app/lib/screens/farm_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class _FarmScreenState extends State<FarmScreen> {
9696
Text(
9797
'Loading Farms...',
9898
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
99-
color: Theme.of(context).colorScheme.onBackground,
99+
color: Theme.of(context).colorScheme.onSurface,
100100
fontWeight: FontWeight.bold),
101101
),
102102
],
@@ -108,7 +108,7 @@ class _FarmScreenState extends State<FarmScreen> {
108108
style: Theme.of(context)
109109
.textTheme
110110
.bodyLarge!
111-
.copyWith(color: Theme.of(context).colorScheme.onBackground),
111+
.copyWith(color: Theme.of(context).colorScheme.onSurface),
112112
),
113113
);
114114
} else {

app/lib/screens/identity_verification_screen.dart

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ class _IdentityVerificationScreenState
514514
style: Theme.of(context)
515515
.textTheme
516516
.bodyMedium!
517-
.copyWith(color: Theme.of(context).colorScheme.onBackground),
517+
.copyWith(color: Theme.of(context).colorScheme.onSurface),
518518
),
519519
const SizedBox(
520520
height: 10,
@@ -546,8 +546,10 @@ class _IdentityVerificationScreenState
546546
),
547547
Text(
548548
'One moment please',
549-
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
550-
color: Theme.of(context).colorScheme.onBackground),
549+
style: Theme.of(context)
550+
.textTheme
551+
.bodyMedium!
552+
.copyWith(color: Theme.of(context).colorScheme.onSurface),
551553
),
552554
const SizedBox(
553555
height: 10,
@@ -605,7 +607,7 @@ class _IdentityVerificationScreenState
605607
color: Theme.of(context).colorScheme.primary,
606608
width: 2),
607609
shape: BoxShape.circle,
608-
color: Theme.of(context).colorScheme.background),
610+
color: Theme.of(context).colorScheme.surface),
609611
child: Row(
610612
mainAxisAlignment: MainAxisAlignment.center,
611613
children: [
@@ -640,7 +642,7 @@ class _IdentityVerificationScreenState
640642
fontWeight: FontWeight.bold,
641643
color: Theme.of(context)
642644
.colorScheme
643-
.onBackground),
645+
.onSurface),
644646
),
645647
)
646648
],
@@ -729,7 +731,7 @@ class _IdentityVerificationScreenState
729731
border: Border.all(
730732
color: Theme.of(context).colorScheme.primary, width: 2),
731733
shape: BoxShape.circle,
732-
color: Theme.of(context).colorScheme.background),
734+
color: Theme.of(context).colorScheme.surface),
733735
child: Row(
734736
mainAxisAlignment: MainAxisAlignment.center,
735737
children: [
@@ -783,7 +785,7 @@ class _IdentityVerificationScreenState
783785
fontWeight: FontWeight.bold,
784786
color: Theme.of(context)
785787
.colorScheme
786-
.onBackground),
788+
.onSurface),
787789
),
788790
)
789791
],
@@ -935,7 +937,7 @@ class _IdentityVerificationScreenState
935937
fontWeight: FontWeight.bold,
936938
color: Theme.of(context)
937939
.colorScheme
938-
.onBackground)))
940+
.onSurface)))
939941
],
940942
),
941943
const SizedBox(height: 5),
@@ -1354,16 +1356,14 @@ class _IdentityVerificationScreenState
13541356
.textTheme
13551357
.headlineMedium!
13561358
.copyWith(
1357-
color:
1358-
Theme.of(context).colorScheme.onBackground),
1359+
color: Theme.of(context).colorScheme.onSurface),
13591360
)
13601361
: Text('Change email',
13611362
style: Theme.of(context)
13621363
.textTheme
13631364
.headlineMedium!
13641365
.copyWith(
1365-
color:
1366-
Theme.of(context).colorScheme.onBackground)),
1366+
color: Theme.of(context).colorScheme.onSurface)),
13671367
contentPadding: const EdgeInsets.all(24),
13681368
content: Column(
13691369
mainAxisSize: MainAxisSize.min,
@@ -1374,18 +1374,16 @@ class _IdentityVerificationScreenState
13741374
.textTheme
13751375
.bodyLarge!
13761376
.copyWith(
1377-
color: Theme.of(context)
1378-
.colorScheme
1379-
.onBackground))
1377+
color:
1378+
Theme.of(context).colorScheme.onSurface))
13801379
: Text(
13811380
'Changing your email will require you to go through the email verification process again.',
13821381
style: Theme.of(context)
13831382
.textTheme
13841383
.bodyLarge!
13851384
.copyWith(
1386-
color: Theme.of(context)
1387-
.colorScheme
1388-
.onBackground)),
1385+
color:
1386+
Theme.of(context).colorScheme.onSurface)),
13891387
TextField(
13901388
controller: controller,
13911389
decoration: InputDecoration(

app/lib/screens/login_screen.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ class _LoginScreenState extends State<LoginScreen> with BlockAndRunMixin {
111111
padding: const EdgeInsets.only(right: 24.0, left: 24.0),
112112
child: Text(
113113
isMobileCheck ? scopeTextMobile : scopeText,
114-
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
115-
color: Theme.of(context).colorScheme.onBackground),
114+
style: Theme.of(context)
115+
.textTheme
116+
.bodyLarge!
117+
.copyWith(color: Theme.of(context).colorScheme.onSurface),
116118
textAlign: TextAlign.center,
117119
),
118120
),
@@ -187,7 +189,8 @@ class _LoginScreenState extends State<LoginScreen> with BlockAndRunMixin {
187189
padding: const EdgeInsets.only(right: 24.0, left: 24.0),
188190
child: Text(
189191
'Attempt expires in ${(timeLeft >= 0) ? timeLeft.toString() : '0'} second(s).',
190-
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Theme.of(context).colorScheme.onBackground),
192+
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
193+
color: Theme.of(context).colorScheme.onSurface),
191194
textAlign: TextAlign.center,
192195
),
193196
),

0 commit comments

Comments
 (0)