diff --git a/README.md b/README.md index 2ddde29..e2ad55c 100644 --- a/README.md +++ b/README.md @@ -108,13 +108,13 @@ class TabContainer extends ImplicitlyAnimatedWidget { /// The [TextStyle] applied to the text of the currently selected tab. /// /// Must specify values for the same properties as [unselectedTextStyle]. - /// Defaults to Theme.of(context).textTheme.bodyText2. + /// Defaults to Theme.of(context).textTheme.bodyMedium. final TextStyle? selectedTextStyle; /// The [TextStyle] applied to the text of currently unselected tabs. /// /// Must specify values for the same properties as [selectedTextStyle]. - /// Defaults to Theme.of(context).textTheme.bodyText2. + /// Defaults to Theme.of(context).textTheme.bodyMedium. final TextStyle? unselectedTextStyle; /// The [TextDirection] for tabs and semantics. diff --git a/example/lib/main.dart b/example/lib/main.dart index d960c1e..8f852f9 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -71,9 +71,9 @@ class _ExamplePageState extends State { Color(0xff9aebed), ], selectedTextStyle: - textTheme.bodyText2?.copyWith(fontSize: 15.0), + textTheme.bodyMedium?.copyWith(fontSize: 15.0), unselectedTextStyle: - textTheme.bodyText2?.copyWith(fontSize: 13.0), + textTheme.bodyMedium?.copyWith(fontSize: 13.0), children: _getChildren1(), tabs: _getTabs1(), ), @@ -88,9 +88,9 @@ class _ExamplePageState extends State { color: Colors.black, tabDuration: const Duration(seconds: 0), selectedTextStyle: - textTheme.bodyText2?.copyWith(color: Colors.white), + textTheme.bodyMedium?.copyWith(color: Colors.white), unselectedTextStyle: - textTheme.bodyText2?.copyWith(color: Colors.black), + textTheme.bodyMedium?.copyWith(color: Colors.black), children: _getChildren2(), tabs: _getTabs2(), ), @@ -100,11 +100,11 @@ class _ExamplePageState extends State { children: [ IconButton( onPressed: () => _controller.prev(), - icon: Icon(Ionicons.arrow_back), + icon: const Icon(Ionicons.arrow_back), ), IconButton( onPressed: () => _controller.next(), - icon: Icon(Ionicons.arrow_forward), + icon: const Icon(Ionicons.arrow_forward), ), ], ), @@ -195,7 +195,7 @@ class _ExamplePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Info', style: Theme.of(context).textTheme.headline5), + Text('Info', style: Theme.of(context).textTheme.headlineSmall), const Text( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non ex ac metus facilisis pulvinar. In id nulla tellus. Donec vehicula iaculis lacinia. Fusce tincidunt viverra nisi non ultrices. Donec accumsan metus sed purus ullamcorper tincidunt. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.', ), @@ -204,14 +204,14 @@ class _ExamplePageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Documents', style: Theme.of(context).textTheme.headline5), + Text('Documents', style: Theme.of(context).textTheme.headlineSmall), const Spacer(flex: 2), - Expanded( + const Expanded( flex: 4, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: const [ + children: [ Divider(thickness: 1), Padding( padding: EdgeInsets.only(left: 10.0), @@ -236,9 +236,9 @@ class _ExamplePageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Profile', style: Theme.of(context).textTheme.headline5), + Text('Profile', style: Theme.of(context).textTheme.headlineSmall), const Spacer(flex: 3), - Expanded( + const Expanded( flex: 3, child: Row( children: [ @@ -247,20 +247,20 @@ class _ExamplePageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: const [ + children: [ Text('username:'), Text('email:'), Text('birthday:'), ], ), ), - const Spacer(), + Spacer(), Flexible( flex: 5, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: const [ + children: [ Text('John Doe'), Text('john.doe@email.com'), Text('1/1/1985'), @@ -276,7 +276,7 @@ class _ExamplePageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Settings', style: Theme.of(context).textTheme.headline5), + Text('Settings', style: Theme.of(context).textTheme.headlineSmall), const Spacer(flex: 1), Expanded( flex: 3, @@ -288,13 +288,13 @@ class _ExamplePageState extends State { title: const Text('Darkmode'), value: false, onChanged: (v) {}, - secondary: Icon(Ionicons.moon), + secondary: const Icon(Ionicons.moon), ), SwitchListTile( title: const Text('Analytics'), value: false, onChanged: (v) {}, - secondary: Icon(Ionicons.analytics), + secondary: const Icon(Ionicons.analytics), ), ], ), @@ -304,16 +304,16 @@ class _ExamplePageState extends State { ]; List _getTabs3(BuildContext context) => [ - Icon( + const Icon( Ionicons.information_circle, ), - Icon( + const Icon( Ionicons.document_text, ), - Icon( + const Icon( Ionicons.person, ), - Icon( + const Icon( Ionicons.settings, ), ]; @@ -325,7 +325,7 @@ class _ExamplePageState extends State { children: [ Text( 'Page 1', - style: Theme.of(context).textTheme.headline5?.copyWith( + style: Theme.of(context).textTheme.headlineSmall?.copyWith( color: Colors.white, ), ), @@ -344,7 +344,7 @@ class _ExamplePageState extends State { children: [ Text( 'Page 2', - style: Theme.of(context).textTheme.headline5?.copyWith( + style: Theme.of(context).textTheme.headlineSmall?.copyWith( color: Colors.white, ), ), @@ -364,7 +364,7 @@ Donec ac libero arcu. Pellentesque sollicitudin mi et lectus interdum, sit amet children: [ Text( 'Page 3', - style: Theme.of(context).textTheme.headline5?.copyWith( + style: Theme.of(context).textTheme.headlineSmall?.copyWith( color: Colors.white, ), ), diff --git a/lib/src/tab_container.dart b/lib/src/tab_container.dart index 71cb553..3fa03a3 100644 --- a/lib/src/tab_container.dart +++ b/lib/src/tab_container.dart @@ -184,13 +184,13 @@ class TabContainer extends ImplicitlyAnimatedWidget { /// The [TextStyle] applied to the text of the currently selected tab. /// /// Must specify values for the same properties as [unselectedTextStyle]. - /// Defaults to Theme.of(context).textTheme.bodyText2. + /// Defaults to Theme.of(context).textTheme.bodyMedium. final TextStyle? selectedTextStyle; /// The [TextStyle] applied to the text of currently unselected tabs. /// /// Must specify values for the same properties as [selectedTextStyle]. - /// Defaults to Theme.of(context).textTheme.bodyText2. + /// Defaults to Theme.of(context).textTheme.bodyMedium. final TextStyle? unselectedTextStyle; /// The [TextDirection] for tabs and semantics. @@ -366,10 +366,10 @@ class _TabContainerState extends AnimatedWidgetBaseState { @override void didChangeDependencies() { _selectedTextStyle = widget.selectedTextStyle ?? - Theme.of(context).textTheme.bodyText2 ?? + Theme.of(context).textTheme.bodyMedium ?? const TextStyle(); _unselectedTextStyle = widget.unselectedTextStyle ?? - Theme.of(context).textTheme.bodyText2 ?? + Theme.of(context).textTheme.bodyMedium ?? const TextStyle(); _textDirection = widget.textDirection ?? Directionality.of(context); _tabExtent = max(widget.tabExtent, widget.radius * 2); diff --git a/pubspec.lock b/pubspec.lock index 816c48a..f214361 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,51 +5,50 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.1" + 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" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + 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" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.17.2" 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" flutter: dependency: "direct main" description: flutter @@ -59,7 +58,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" flutter_test: @@ -67,34 +67,54 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_vector_icons: + dependency: "direct main" + description: + name: flutter_vector_icons + sha256: "20a77e282f8cb438c8edcee4eec85d8497d5f4cbeb07d116e9d2d01c9edfc5e2" + url: "https://pub.dev" + source: hosted + version: "2.0.0" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.9.1" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.8.3" sky_engine: dependency: transitive description: flutter @@ -104,58 +124,66 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.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: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" source: hosted - version: "0.4.2" - typed_data: + version: "0.6.0" + vector_math: dependency: transitive description: - name: typed_data - url: "https://pub.dartlang.org" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "1.3.0" - vector_math: + version: "2.1.4" + web: dependency: transitive description: - name: vector_math - url: "https://pub.dartlang.org" + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "0.1.4-beta" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=1.17.0" diff --git a/pubspec.yaml b/pubspec.yaml index 400b3b7..dd05466 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,6 +13,7 @@ environment: dependencies: flutter: sdk: flutter + flutter_vector_icons: ^2.0.0 dev_dependencies: flutter_test: