Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/android/app/build_local
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
// compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

sourceSets {
Expand Down
3 changes: 1 addition & 2 deletions app/android/app/build_production
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
// compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

sourceSets {
Expand Down
3 changes: 1 addition & 2 deletions app/android/app/build_staging
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
// compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

sourceSets {
Expand Down
3 changes: 1 addition & 2 deletions app/android/app/build_testing
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
// compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

sourceSets {
Expand Down
1 change: 1 addition & 0 deletions app/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.jetifier.ignorelist=bcprov-jdk15on
android.enableJetifier=true
android.enableR8.fullMode=false
org.gradle.jvmargs=-Xmx1536M \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
Expand Down
21 changes: 9 additions & 12 deletions app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ Future<void> main() async {
ThemeMode initialThemeMode = ThemeMode.system;

ThemeProvider themeProvider = ThemeProvider(initialThemeMode);
await themeProvider.loadTheme();
await themeProvider.loadTheme();

runApp(
MultiProvider(
providers: [
ChangeNotifierProvider(
create: (context) => themeProvider),
ChangeNotifierProvider(
create: (context) => TermsAgreement()),
ChangeNotifierProvider(create: (context) => themeProvider),
ChangeNotifierProvider(create: (context) => TermsAgreement()),
],
child: MyApp(initDone: initDone, registered: registered),
),
Expand All @@ -70,7 +68,7 @@ Future<void> setGlobalValues() async {
}

class MyApp extends StatelessWidget {
const MyApp({
const MyApp({
super.key,
required this.initDone,
this.doubleName,
Expand Down Expand Up @@ -108,7 +106,7 @@ class MyApp extends StatelessWidget {
foregroundColor: kColorScheme.onPrimary,
),
cardTheme: const CardTheme().copyWith(
color: kColorScheme.secondaryContainer,
color: kColorScheme.surfaceContainer,
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8)),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
Expand All @@ -118,7 +116,7 @@ class MyApp extends StatelessWidget {
),
expansionTileTheme: const ExpansionTileThemeData().copyWith(
backgroundColor: kColorScheme.backgroundDarker,
collapsedBackgroundColor: ThemeData().colorScheme.background),
collapsedBackgroundColor: ThemeData().colorScheme.surface),
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
selectedItemColor: kColorScheme.primary,
unselectedItemColor: kColorScheme.secondary,
Expand All @@ -134,7 +132,7 @@ class MyApp extends StatelessWidget {
foregroundColor: kDarkColorScheme.onPrimaryContainer,
),
cardTheme: const CardTheme().copyWith(
color: kDarkColorScheme.secondaryContainer,
color: kDarkColorScheme.surfaceContainer,
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8)),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
Expand All @@ -144,15 +142,14 @@ class MyApp extends StatelessWidget {
),
expansionTileTheme: const ExpansionTileThemeData().copyWith(
backgroundColor: kDarkColorScheme.backgroundDarker,
collapsedBackgroundColor: kDarkColorScheme.background),
collapsedBackgroundColor: kDarkColorScheme.surface),
bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith(
selectedItemColor: kDarkColorScheme.primary,
unselectedItemColor: kDarkColorScheme.secondary,
),
),
themeMode: themeProvider.themeMode,
home: SplashScreen(
initDone: initDone, registered: registered),
home: SplashScreen(initDone: initDone, registered: registered),
);
}
}
5 changes: 2 additions & 3 deletions app/lib/screens/dao_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class _DaoPageState extends State<DaoPage> {
Text(
'Loading Proposals...',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold),
),
],
Expand All @@ -83,8 +83,7 @@ class _DaoPageState extends State<DaoPage> {
child: TabBar(
labelColor: Theme.of(context).colorScheme.primary,
indicatorColor: Theme.of(context).colorScheme.primary,
unselectedLabelColor:
Theme.of(context).colorScheme.onBackground,
unselectedLabelColor: Theme.of(context).colorScheme.onSurface,
dividerColor: Theme.of(context).scaffoldBackgroundColor,
labelStyle: Theme.of(context).textTheme.titleLarge,
unselectedLabelStyle: Theme.of(context).textTheme.titleMedium,
Expand Down
4 changes: 2 additions & 2 deletions app/lib/screens/farm_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class _FarmScreenState extends State<FarmScreen> {
Text(
'Loading Farms...',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold),
),
],
Expand All @@ -108,7 +108,7 @@ class _FarmScreenState extends State<FarmScreen> {
style: Theme.of(context)
.textTheme
.bodyLarge!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
);
} else {
Expand Down
34 changes: 16 additions & 18 deletions app/lib/screens/identity_verification_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class _IdentityVerificationScreenState
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
const SizedBox(
height: 10,
Expand Down Expand Up @@ -546,8 +546,10 @@ class _IdentityVerificationScreenState
),
Text(
'One moment please',
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onBackground),
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
const SizedBox(
height: 10,
Expand Down Expand Up @@ -605,7 +607,7 @@ class _IdentityVerificationScreenState
color: Theme.of(context).colorScheme.primary,
width: 2),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.background),
color: Theme.of(context).colorScheme.surface),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand Down Expand Up @@ -640,7 +642,7 @@ class _IdentityVerificationScreenState
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.onBackground),
.onSurface),
),
)
],
Expand Down Expand Up @@ -729,7 +731,7 @@ class _IdentityVerificationScreenState
border: Border.all(
color: Theme.of(context).colorScheme.primary, width: 2),
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.background),
color: Theme.of(context).colorScheme.surface),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand Down Expand Up @@ -783,7 +785,7 @@ class _IdentityVerificationScreenState
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.onBackground),
.onSurface),
),
)
],
Expand Down Expand Up @@ -935,7 +937,7 @@ class _IdentityVerificationScreenState
fontWeight: FontWeight.bold,
color: Theme.of(context)
.colorScheme
.onBackground)))
.onSurface)))
],
),
const SizedBox(height: 5),
Expand Down Expand Up @@ -1354,16 +1356,14 @@ class _IdentityVerificationScreenState
.textTheme
.headlineMedium!
.copyWith(
color:
Theme.of(context).colorScheme.onBackground),
color: Theme.of(context).colorScheme.onSurface),
)
: Text('Change email',
style: Theme.of(context)
.textTheme
.headlineMedium!
.copyWith(
color:
Theme.of(context).colorScheme.onBackground)),
color: Theme.of(context).colorScheme.onSurface)),
contentPadding: const EdgeInsets.all(24),
content: Column(
mainAxisSize: MainAxisSize.min,
Expand All @@ -1374,18 +1374,16 @@ class _IdentityVerificationScreenState
.textTheme
.bodyLarge!
.copyWith(
color: Theme.of(context)
.colorScheme
.onBackground))
color:
Theme.of(context).colorScheme.onSurface))
: Text(
'Changing your email will require you to go through the email verification process again.',
style: Theme.of(context)
.textTheme
.bodyLarge!
.copyWith(
color: Theme.of(context)
.colorScheme
.onBackground)),
color:
Theme.of(context).colorScheme.onSurface)),
TextField(
controller: controller,
decoration: InputDecoration(
Expand Down
9 changes: 6 additions & 3 deletions app/lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ class _LoginScreenState extends State<LoginScreen> with BlockAndRunMixin {
padding: const EdgeInsets.only(right: 24.0, left: 24.0),
child: Text(
isMobileCheck ? scopeTextMobile : scopeText,
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onBackground),
style: Theme.of(context)
.textTheme
.bodyLarge!
.copyWith(color: Theme.of(context).colorScheme.onSurface),
textAlign: TextAlign.center,
),
),
Expand Down Expand Up @@ -187,7 +189,8 @@ class _LoginScreenState extends State<LoginScreen> with BlockAndRunMixin {
padding: const EdgeInsets.only(right: 24.0, left: 24.0),
child: Text(
'Attempt expires in ${(timeLeft >= 0) ? timeLeft.toString() : '0'} second(s).',
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Theme.of(context).colorScheme.onBackground),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface),
textAlign: TextAlign.center,
),
),
Expand Down
6 changes: 4 additions & 2 deletions app/lib/screens/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ class _AppState extends State<MainScreen> {
children: [
const Hero(
tag: 'logo',
child: HomeLogoWidget(animate: true,),
child: HomeLogoWidget(
animate: true,
),
),
const SizedBox(height: 50),
Container(
Expand All @@ -78,7 +80,7 @@ class _AppState extends State<MainScreen> {
fontWeight: FontWeight.bold,
color: errorMessage != null
? Theme.of(context).colorScheme.error
: Theme.of(context).colorScheme.onBackground),
: Theme.of(context).colorScheme.onSurface),
),
),
const SizedBox(
Expand Down
18 changes: 11 additions & 7 deletions app/lib/screens/mobile_registration_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class _MobileRegistrationScreenState extends State<MobileRegistrationScreen> {
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
const SizedBox(
height: 10,
Expand Down Expand Up @@ -351,13 +351,15 @@ class _MobileRegistrationScreenState extends State<MobileRegistrationScreen> {
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
subtitle: state.index > 0
? Text(
doubleNameController.text,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onBackground),
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onSurface),
)
: null,
content: Card(
Expand Down Expand Up @@ -437,13 +439,15 @@ class _MobileRegistrationScreenState extends State<MobileRegistrationScreen> {
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
subtitle: state.index > _State.Email.index
? Text(
emailController.text,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onBackground),
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onSurface),
)
: null,
content: Card(
Expand Down
14 changes: 6 additions & 8 deletions app/lib/screens/recover_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,15 @@ class _RecoverScreenState extends State<RecoverScreen> {
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
),
Padding(
padding: const EdgeInsets.all(20),
child: TextFormField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
decorationColor: Theme.of(context).colorScheme.onBackground
),
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
keyboardType: TextInputType.text,
decoration: const InputDecoration(
labelText: 'Name',
Expand All @@ -160,9 +159,8 @@ class _RecoverScreenState extends State<RecoverScreen> {
padding: const EdgeInsets.all(20),
child: TextFormField(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
decorationColor: Theme.of(context).colorScheme.onBackground
),
color: Theme.of(context).colorScheme.onSurface,
decorationColor: Theme.of(context).colorScheme.onSurface),
keyboardType: TextInputType.multiline,
maxLines: null,
decoration: const InputDecoration(
Expand Down Expand Up @@ -274,7 +272,7 @@ class _RecoverScreenState extends State<RecoverScreen> {
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Theme.of(context).colorScheme.onBackground),
.copyWith(color: Theme.of(context).colorScheme.onSurface),
),
const SizedBox(
height: 10,
Expand Down
Loading