diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f4320e..59f165f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,9 @@ "editor.formatOnSaveMode": "modifications", "workbench.colorTheme": "Winter is Coming (Dark Blue)", "editor.codeActionsOnSave": { - "source.organizeImports": true, - "source.fixAll": false, - "source.fixAll.eslint": false + "source.organizeImports": "explicit", + "source.fixAll": "never", + "source.fixAll.eslint": "never" }, "dart.lineLength": 100, "files.exclude": { diff --git a/android/app/build.gradle b/android/app/build.gradle index 5eaa2cc..9d01895 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -33,7 +33,7 @@ def keystoreProperties = new Properties() } android { - compileSdkVersion 33 + compileSdkVersion 34 ndkVersion '25.1.8937393' sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -42,7 +42,7 @@ android { defaultConfig { applicationId "com.vocabhub.app" minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 multiDexEnabled true versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -77,7 +77,6 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation platform('com.google.firebase:firebase-bom:28.2.0') implementation 'com.google.firebase:firebase-analytics' implementation 'androidx.window:window:1.0.0' diff --git a/android/build.gradle b/android/build.gradle index ccbae32..7719a24 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,14 +1,13 @@ buildscript { - ext.kotlin_version = '1.8.20' + ext.kotlin_version = '1.9.0' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.8' } } @@ -20,6 +19,7 @@ allprojects { } rootProject.buildDir = '../build' + subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bc..51561f0 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,26 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.0" apply false + id "com.google.gms.google-services" version "4.4.0" apply false +} + +include ":app" \ No newline at end of file diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 5606174..35c4008 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -40,8 +40,7 @@ extension FindIcon on IconData { void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized() - as IntegrationTestWidgetsFlutterBinding; + final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized(); bool skip = false; diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Podfile b/ios/Podfile index 313ea4a..2c068c4 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index dc277e0..3c5be65 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -346,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -423,7 +423,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -472,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index b52b2e6..e67b280 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { return isExiting; } }, + initialIndex: 0, shouldPopToBaseRoute: true, isDesktop: !SizeUtils.isMobile, // destinationAnimationCurve: Curves.fastOutSlowIn, @@ -295,7 +296,7 @@ class _AdaptiveLayoutState extends ConsumerState { decoration: FloatingNavbarDecoration( height: kNavbarHeight * 1.2, backgroundColor: SizeUtils.isDesktop - ? colorScheme.surfaceVariant + ? colorScheme.surfaceContainerHighest : colorScheme.scrim.withOpacity(0.2), margin: EdgeInsets.zero, showSelectedLabels: false, diff --git a/lib/controller/add_word_controller.dart b/lib/controller/add_word_controller.dart index edcd76b..64439ee 100644 --- a/lib/controller/add_word_controller.dart +++ b/lib/controller/add_word_controller.dart @@ -4,7 +4,7 @@ import 'package:vocabhub/services/services/add_word_service.dart'; import 'package:vocabhub/services/services/service_base.dart'; import 'package:vocabhub/utils/utils.dart'; -class AddWordController extends ChangeNotifier with ServiceBase { +class AddWordController extends ChangeNotifier implements ServiceBase { late List _drafts; late AddWordService _addWordService; late bool hasDrafts = false; diff --git a/lib/controller/auth_controller.dart b/lib/controller/auth_controller.dart index 820eb88..ce97334 100644 --- a/lib/controller/auth_controller.dart +++ b/lib/controller/auth_controller.dart @@ -3,7 +3,7 @@ import 'package:vocabhub/models/models.dart'; import 'package:vocabhub/services/services/auth_service.dart'; import 'package:vocabhub/services/services/service_base.dart'; -class AuthController extends ChangeNotifier with ServiceBase { +class AuthController extends ChangeNotifier implements ServiceBase { late AuthService _authService; late UserModel _user; diff --git a/lib/controller/collections_controller.dart b/lib/controller/collections_controller.dart index f764f70..829bbf3 100644 --- a/lib/controller/collections_controller.dart +++ b/lib/controller/collections_controller.dart @@ -5,7 +5,7 @@ import 'package:vocabhub/services/services/service_base.dart'; import 'package:vocabhub/utils/extensions.dart'; import 'package:vocabhub/utils/utility.dart'; -class CollectionsNotifier extends ChangeNotifier with ServiceBase { +class CollectionsNotifier extends ChangeNotifier implements ServiceBase { late CollectionsService _collectionService; List _collections = []; List get collections => _collections; diff --git a/lib/controller/dashboard_controller.dart b/lib/controller/dashboard_controller.dart index fd0c6fe..af03ae2 100644 --- a/lib/controller/dashboard_controller.dart +++ b/lib/controller/dashboard_controller.dart @@ -3,7 +3,7 @@ import 'package:vocabhub/models/word.dart'; import 'package:vocabhub/services/services.dart'; import 'package:vocabhub/services/services/service_base.dart'; -class DashboardController extends ChangeNotifier with ServiceBase { +class DashboardController extends ChangeNotifier implements ServiceBase { bool _isLoading = true; bool get isLoading => _isLoading; diff --git a/lib/controller/explore_controller.dart b/lib/controller/explore_controller.dart index ad948b5..e8bd022 100644 --- a/lib/controller/explore_controller.dart +++ b/lib/controller/explore_controller.dart @@ -6,7 +6,7 @@ import 'package:vocabhub/models/word.dart'; import 'package:vocabhub/services/services/explore_service.dart'; import 'package:vocabhub/services/services/service_base.dart'; -class ExploreController extends ChangeNotifier with ServiceBase { +class ExploreController extends ChangeNotifier implements ServiceBase { late DateTime _scrollMessageShownDate; late bool _isScrollMessageShown = false; late final ExploreService _exploreService; diff --git a/lib/controller/searchfield_controller.dart b/lib/controller/searchfield_controller.dart index 621ad45..465e50b 100644 --- a/lib/controller/searchfield_controller.dart +++ b/lib/controller/searchfield_controller.dart @@ -3,7 +3,7 @@ import 'package:vocabhub/models/word.dart'; import 'package:vocabhub/services/services/search_service.dart'; import 'package:vocabhub/services/services/service_base.dart'; -class SearchFieldController extends ChangeNotifier with ServiceBase { +class SearchFieldController extends ChangeNotifier implements ServiceBase { late TextEditingController _searchController; late SearchService _searchService; diff --git a/lib/main.dart b/lib/main.dart index 69e77e1..9b2c397 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -198,9 +198,8 @@ class _VocabAppState extends ConsumerState { bodyColor: Colors.white, displayColor: Colors.white, ), - scaffoldBackgroundColor: colorScheme.background, + scaffoldBackgroundColor: colorScheme.surface, colorScheme: ColorScheme.fromSeed( - background: Colors.transparent, surface: appThemeController.isDark ? Colors.black.withOpacity(0.3) : Colors.white.withOpacity(0.3), @@ -209,7 +208,7 @@ class _VocabAppState extends ConsumerState { theme: ThemeData( useMaterial3: true, textTheme: GoogleFonts.quicksandTextTheme(), - scaffoldBackgroundColor: colorScheme.background, + scaffoldBackgroundColor: colorScheme.surface, colorScheme: ColorScheme.fromSeed(seedColor: appThemeController.themeSeed)), routes: { Notifications.route: (context) => Notifications(), diff --git a/lib/navbar/explore/explore.dart b/lib/navbar/explore/explore.dart index f5b0212..3158dfc 100644 --- a/lib/navbar/explore/explore.dart +++ b/lib/navbar/explore/explore.dart @@ -609,7 +609,7 @@ class _WordMasteredPreferenceState extends State { preferBelow: false, decoration: BoxDecoration(color: colorScheme.tertiaryContainer), richMessage: TextSpan( - style: Theme.of(context).textTheme.bodyText1!.copyWith( + style: Theme.of(context).textTheme.bodyLarge!.copyWith( fontWeight: FontWeight.w200, ), children: [ diff --git a/lib/pages/notifications/notification_detail.dart b/lib/pages/notifications/notification_detail.dart index 5ca0a07..d3c6dca 100644 --- a/lib/pages/notifications/notification_detail.dart +++ b/lib/pages/notifications/notification_detail.dart @@ -201,7 +201,7 @@ class _NotificationDetailMobileState extends ConsumerState list = (value.data as List); + final List list = (value.data as List); return ListView.builder( itemCount: list.length, itemBuilder: (context, index) { @@ -240,7 +240,7 @@ class DifferenceVisualizer extends ConsumerWidget { final appThemeController = ref.watch(appThemeProvider); - bool hasChange = newVersion != oldVersion; + final bool hasChange = newVersion != oldVersion; if (!hasChange) { return ListTile( title: Text( diff --git a/lib/pages/notifications/notifications.dart b/lib/pages/notifications/notifications.dart index 9153381..98f01ea 100644 --- a/lib/pages/notifications/notifications.dart +++ b/lib/pages/notifications/notifications.dart @@ -40,7 +40,7 @@ class _NotificationsNavigatorState extends State { case Notifications.route: return MaterialPageRoute(builder: (context) => Notifications()); case NotificationDetail.route: - final collection = settings.arguments as VHCollection; + // final collection = settings.arguments as VHCollection; return MaterialPageRoute( builder: (context) => NotificationDetail( isNotification: widget.isNotification!, @@ -323,7 +323,7 @@ class UserNotificationTile extends StatelessWidget { height: 100, decoration: BoxDecoration( color: Colors.transparent, - border: Border.all(color: colorScheme.surfaceVariant, width: 1), + border: Border.all(color: colorScheme.surfaceContainerHighest, width: 1), borderRadius: BorderRadius.circular(4), boxShadow: [VocabTheme.notificationCardShadow], ), @@ -418,7 +418,7 @@ class AdminNotificationTile extends StatelessWidget { decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.circular(4), - border: Border.all(color: colorScheme.surfaceVariant, width: 1), + border: Border.all(color: colorScheme.surfaceContainerHighest, width: 1), boxShadow: [VocabTheme.notificationCardShadow], ), margin: EdgeInsets.symmetric(horizontal: 8, vertical: 4), diff --git a/lib/services/services.dart b/lib/services/services.dart index 4382f3c..26bfaf4 100644 --- a/lib/services/services.dart +++ b/lib/services/services.dart @@ -2,7 +2,6 @@ library services; export 'package:vocabhub/main.dart'; -export 'services/auth_service.dart'; export 'services/auth_service.dart'; export 'services/dashboard_service.dart'; export 'services/edit_history.dart'; diff --git a/lib/widgets/widgets.dart b/lib/widgets/widgets.dart index 538838b..bbb8c96 100644 --- a/lib/widgets/widgets.dart +++ b/lib/widgets/widgets.dart @@ -100,7 +100,7 @@ RichText buildNotification(String notification, String word, {TextStyle? style}) return RichText(text: TextSpan(text: '', children: textSpans)); } -Widget heading(String title, {double fontSize: 20, Color? color}) { +Widget heading(String title, {double fontSize = 20, Color? color}) { return Text( title, style: TextStyle( diff --git a/pubspec.yaml b/pubspec.yaml index 75a1806..c85aed0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,18 +4,20 @@ publish_to: "none" version: 0.7.8+30 environment: - sdk: ">=2.17.0 <3.0.0" - + sdk: ">=3.3.0 <4.0.0" dependencies: - animations: ^2.0.7 + animations: ^2.0.11 cached_network_image: ^3.2.3 cupertino_icons: ^1.0.5 - feature_discovery: ^0.14.1 - firebase_analytics: ^10.4.4 - firebase_core: ^2.4.1 - firebase_messaging: ^14.2.1 - firebase_messaging_web: ^3.5.1 - firebase_remote_config: ^3.0.9 + feature_discovery: + git: + url: https://github.com/maheshmnj/feature_discovery.git + ref: master + firebase_analytics: ^10.10.5 + firebase_core: ^2.31.0 + firebase_messaging: ^14.9.2 + firebase_messaging_web: ^3.8.5 + firebase_remote_config: ^4.4.5 flutter: sdk: flutter flutter_local_notifications: ^15.0.0 @@ -24,11 +26,16 @@ dependencies: fluttertoast: ^8.0.9 go_router: ^7.0.2 google_fonts: ^4.0.4 - google_sign_in: ^5.4.1 + google_sign_in: ^5.4.4 http: ^0.13.6 intl: ^0.18.0 json_annotation: ^4.6.0 - navbar_router: ^0.7.3 + # navbar_router: ^0.7.3 + navbar_router: + ^0.7.4 + # git: + # url: https://github.com/maheshmnj/navbar_router.git + # ref: issue-38 # navbar_router: # path: ../../oss/my_packages/navbar_router # url: https://github.com/maheshmnj/navbar_router.git