diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 13cf3c9..895f4ca 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,29 +22,33 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 28 + namespace "com.smartapeth.example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } - lintOptions { - disable 'InvalidPackage' + sourceSets { + main.java.srcDirs += 'src/main/kotlin' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.smartapeth.example" - minSdkVersion 16 - targetSdkVersion 27 + applicationId "com.example.toto" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { @@ -59,9 +64,4 @@ flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} +dependencies {} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 811908e..cbb7017 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,38 +1,33 @@ - - - - - - + - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..cb1ef88 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -1,8 +1,18 @@ - + + diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/build.gradle b/example/android/build.gradle index b7faad8..fb84b31 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.2.71' + ext.kotlin_version = '1.9.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:8.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 8bd86f6..1eacf12 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1 +1,4 @@ org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.debug.obsoleteApi=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 2819f02..e6b38c2 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 5a2f14f..55c4ca8 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,15 +1,20 @@ -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 + } + settings.ext.flutterSdkPath = flutterSdkPath() -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +include ":app" + +apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 199d84c..805fc1d 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,13 +1,13 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/tonyowen/dev/sdk/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/tonyowen/dev/projects/flutter/fancy_bottom_navigation/example" +export "FLUTTER_ROOT=/Users/aurick/Library/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/aurick/DATA/Programmation/Github/fancy_bottom_navigation/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build/ios" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" +export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.packages" +export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/example/lib/main.dart b/example/lib/main.dart index ebefd4d..f8938b4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -79,23 +79,15 @@ class _MyHomePageState extends State { mainAxisSize: MainAxisSize.min, children: [ Text("This is the home page"), - RaisedButton( - child: Text( - "Start new page", - style: TextStyle(color: Colors.white), - ), - color: Theme.of(context).primaryColor, + ElevatedButton( + child: Text("Start new page"), onPressed: () { Navigator.of(context).push( MaterialPageRoute(builder: (context) => SecondPage())); }, ), - RaisedButton( - child: Text( - "Change to page 3", - style: TextStyle(color: Colors.white), - ), - color: Theme.of(context).accentColor, + ElevatedButton( + child: Text("Change to page 3"), onPressed: () { final FancyBottomNavigationState fState = bottomNavigationKey .currentState as FancyBottomNavigationState; @@ -109,12 +101,8 @@ class _MyHomePageState extends State { mainAxisSize: MainAxisSize.min, children: [ Text("This is the search page"), - RaisedButton( - child: Text( - "Start new page", - style: TextStyle(color: Colors.white), - ), - color: Theme.of(context).primaryColor, + ElevatedButton( + child: Text("Start new page"), onPressed: () { Navigator.of(context).push( MaterialPageRoute(builder: (context) => SecondPage())); @@ -127,12 +115,8 @@ class _MyHomePageState extends State { mainAxisSize: MainAxisSize.min, children: [ Text("This is the basket page"), - RaisedButton( - child: Text( - "Start new page", - style: TextStyle(color: Colors.white), - ), - color: Theme.of(context).primaryColor, + ElevatedButton( + child: Text("Start new page"), onPressed: () {}, ) ], diff --git a/example/lib/second_page.dart b/example/lib/second_page.dart index 0c55148..dbd0b5f 100644 --- a/example/lib/second_page.dart +++ b/example/lib/second_page.dart @@ -9,8 +9,12 @@ class _SecondPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text("Second page"),), - body: Center(child: Text("Nothing to see here"),), + appBar: AppBar( + title: Text("Second page"), + ), + body: Center( + child: Text("Nothing to see here"), + ), ); } } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0394863..64e31fd 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ description: A new Flutter application. version: 1.0.0+1 environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: ">=2.12.0 <4.0.0" dependencies: flutter: diff --git a/lib/fancy_bottom_navigation.dart b/lib/fancy_bottom_navigation.dart index d05bde6..0b224c1 100644 --- a/lib/fancy_bottom_navigation.dart +++ b/lib/fancy_bottom_navigation.dart @@ -23,9 +23,7 @@ class FancyBottomNavigation extends StatefulWidget { this.inactiveIconColor, this.textColor, this.barBackgroundColor}) - : assert(onTabChangedListener != null), - assert(tabs != null), - assert(tabs.length > 1 && tabs.length < 5); + : assert(tabs.length > 1 && tabs.length < 5); final Function(int position) onTabChangedListener; final Color? circleColor; @@ -56,6 +54,7 @@ class FancyBottomNavigationState extends State late Color inactiveIconColor; late Color barBackgroundColor; late Color textColor; + late Color shadowColor; @override void didChangeDependencies() { @@ -85,6 +84,9 @@ class FancyBottomNavigationState extends State ((Theme.of(context).brightness == Brightness.dark) ? Colors.white : Theme.of(context).primaryColor); + shadowColor = Theme.of(context).brightness == Brightness.dark + ? Colors.black38 + : Colors.black12; } @override @@ -108,14 +110,13 @@ class FancyBottomNavigationState extends State @override Widget build(BuildContext context) { return Stack( - overflow: Overflow.visible, + clipBehavior: Clip.none, alignment: Alignment.bottomCenter, children: [ Container( height: BAR_HEIGHT, decoration: BoxDecoration(color: barBackgroundColor, boxShadow: [ - BoxShadow( - color: Colors.black12, offset: Offset(0, -1), blurRadius: 8) + BoxShadow(color: shadowColor, offset: Offset(0, -1), blurRadius: 8) ]), child: Row( mainAxisSize: MainAxisSize.max, @@ -128,6 +129,7 @@ class FancyBottomNavigationState extends State title: t.title, iconColor: inactiveIconColor, textColor: textColor, + semanticLabel: t.semanticLabel, callbackFunction: (uniqueKey) { int selected = widget.tabs .indexWhere((tabData) => tabData.key == uniqueKey); @@ -168,11 +170,10 @@ class FancyBottomNavigationState extends State width: CIRCLE_SIZE + CIRCLE_OUTLINE, height: CIRCLE_SIZE + CIRCLE_OUTLINE, decoration: BoxDecoration( - color: Colors.white, shape: BoxShape.circle, boxShadow: [ BoxShadow( - color: Colors.black12, + color: shadowColor, blurRadius: 8) ])), ), @@ -244,10 +245,16 @@ class FancyBottomNavigationState extends State } class TabData { - TabData({required this.iconData, required this.title, this.onclick}); + TabData({ + required this.iconData, + required this.title, + this.semanticLabel, + this.onclick, + }); IconData iconData; String title; Function? onclick; + String? semanticLabel; final UniqueKey key = UniqueKey(); } diff --git a/lib/internal/tab_item.dart b/lib/internal/tab_item.dart index 3f26b1d..4a4adcc 100644 --- a/lib/internal/tab_item.dart +++ b/lib/internal/tab_item.dart @@ -9,14 +9,16 @@ const double ALPHA_ON = 1; const int ANIM_DURATION = 300; class TabItem extends StatelessWidget { - TabItem( - {required this.uniqueKey, - required this.selected, - required this.iconData, - required this.title, - required this.callbackFunction, - required this.textColor, - required this.iconColor}); + TabItem({ + required this.uniqueKey, + required this.selected, + required this.iconData, + required this.title, + required this.callbackFunction, + required this.textColor, + required this.iconColor, + this.semanticLabel, + }); final UniqueKey uniqueKey; final String title; @@ -25,6 +27,7 @@ class TabItem extends StatelessWidget { final Function(UniqueKey uniqueKey) callbackFunction; final Color textColor; final Color iconColor; + final String? semanticLabel; final double iconYAlign = ICON_ON; final double textYAlign = TEXT_OFF; @@ -71,7 +74,9 @@ class TabItem extends StatelessWidget { icon: Icon( iconData, color: iconColor, + semanticLabel: semanticLabel, ), + tooltip: title, onPressed: () { callbackFunction(uniqueKey); }, diff --git a/lib/paint/half_clipper.dart b/lib/paint/half_clipper.dart index 731ef59..5f3f40d 100644 --- a/lib/paint/half_clipper.dart +++ b/lib/paint/half_clipper.dart @@ -11,4 +11,4 @@ class HalfClipper extends CustomClipper { bool shouldReclip(CustomClipper oldClipper) { return true; } -} \ No newline at end of file +} diff --git a/lib/paint/half_painter.dart b/lib/paint/half_painter.dart index 6d3f37a..adcf75f 100644 --- a/lib/paint/half_painter.dart +++ b/lib/paint/half_painter.dart @@ -13,7 +13,7 @@ class HalfPainter extends CustomPainter { final Rect beforeRect = Rect.fromLTWH(0, (size.height / 2) - 10, 10, 10); final Rect largeRect = Rect.fromLTWH(10, 0, size.width - 20, 70); final Rect afterRect = - Rect.fromLTWH(size.width - 10, (size.height / 2) - 10, 10, 10); + Rect.fromLTWH(size.width - 10, (size.height / 2) - 10, 10, 10); final path = Path(); path.arcTo(beforeRect, radians(0), radians(90), false); @@ -31,4 +31,4 @@ class HalfPainter extends CustomPainter { bool shouldRepaint(CustomPainter oldDelegate) { return true; } -} \ No newline at end of file +} diff --git a/pubspec.lock b/pubspec.lock index 4184453..4b008e1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,55 +1,155 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77" + url: "https://pub.dev" + source: hosted + version: "73.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a" + url: "https://pub.dev" + source: hosted + version: "6.8.0" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" - characters: + version: "2.1.1" + build: dependency: transitive description: - name: characters - url: "https://pub.dartlang.org" + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: + version: "2.4.1" + built_collection: dependency: transitive description: - name: charcode - url: "https://pub.dartlang.org" + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + url: "https://pub.dev" + source: hosted + version: "3.0.5" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.7" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -60,94 +160,211 @@ packages: description: flutter source: sdk version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.15.0" mockito: dependency: "direct dev" description: name: mockito - url: "https://pub.dartlang.org" + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.3.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" source: hosted - version: "0.2.19" + version: "0.7.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" vector_math: dependency: "direct main" description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml index 5e6d623..0b94deb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,21 +1,21 @@ name: fancy_bottom_navigation description: An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable.. -version: 0.3.3 +version: 0.4.0 author: Smart Apeth homepage: https://github.com/tunitowen/fancy_bottom_navigation environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: flutter: sdk: flutter - vector_math: ^2.0.8 + vector_math: ^2.1.4 dev_dependencies: flutter_test: sdk: flutter - mockito: ^4.0.0 + mockito: ^5.4.4 # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec diff --git a/test/fancy_widget_tests.dart b/test/fancy_widget_tests.dart index 847027a..1b12e5b 100644 --- a/test/fancy_widget_tests.dart +++ b/test/fancy_widget_tests.dart @@ -5,11 +5,9 @@ import 'package:flutter_test/flutter_test.dart'; void main() { Widget makeTestableWidget({required Widget child}) { return MaterialApp( - theme: ThemeData(primaryColor: Colors.pink, - brightness: Brightness.light), - home: Scaffold( - body: Center(), - bottomNavigationBar: child)); + theme: + ThemeData(primaryColor: Colors.pink, brightness: Brightness.light), + home: Scaffold(body: Center(), bottomNavigationBar: child)); } testWidgets('Fancy Nav has correct tabs', (WidgetTester tester) async { @@ -37,7 +35,6 @@ void main() { final randomFinder = find.text("Hello"); expect(randomFinder, findsNothing); - }); testWidgets('Clicking icon moves the circle', (WidgetTester tester) async { @@ -68,7 +65,5 @@ void main() { expect(searchIconFinder, findsNWidgets(2)); expect(homeIconFinder, findsOneWidget); - }); - -} \ No newline at end of file +}