diff --git a/lib/views/home/components/bottom_bar.dart b/lib/views/home/components/bottom_bar.dart index 0fb052f..8401901 100644 --- a/lib/views/home/components/bottom_bar.dart +++ b/lib/views/home/components/bottom_bar.dart @@ -29,24 +29,30 @@ class BottomBar extends StatelessWidget { ? BottomNavigationBarItem( backgroundColor: menuColor, icon: Icon(MdiIcons.cashRegister, color: Colors.white), - title: new Text( - 'Касса', - style: TextStyle(color: Colors.white), - )) + label: 'Касса', + // title: new Text( + // 'Касса', + // style: TextStyle(color: Colors.white), + // ) + ) : BottomNavigationBarItem( backgroundColor: menuColor, icon: Icon(MdiIcons.calculator, color: Colors.white), - title: new Text( - 'Калькулятор', - style: TextStyle(color: Colors.white), - )), + label: 'Калькулятор', + // title: new Text( + // 'Калькулятор', + // style: TextStyle(color: Colors.white), + // ) + ), BottomNavigationBarItem( backgroundColor: menuColor, icon: Icon(MdiIcons.tune, color: Colors.white), - title: new Text( - 'Опции', - style: TextStyle(color: Colors.white), - )), + label: 'Опции' + // title: new Text( + // 'Опции', + // style: TextStyle(color: Colors.white), + // ) + ), ], onTap: (index) { pageController.animateToPage( diff --git a/lib/views/home/home_view.dart b/lib/views/home/home_view.dart index 46c3459..72aab32 100644 --- a/lib/views/home/home_view.dart +++ b/lib/views/home/home_view.dart @@ -85,6 +85,7 @@ class _HomeViewState extends State { converter: (store) => store.state.settingState, builder: (context, vm) { return PageView( + pageSnapping: true, onPageChanged: (index) { setState(() { selectedTabIndex = index; diff --git a/lib/views/home/tabs/kassaView/ProductAddBottomSheet.dart b/lib/views/home/tabs/kassaView/ProductAddBottomSheet.dart index cc8134e..9ff7521 100644 --- a/lib/views/home/tabs/kassaView/ProductAddBottomSheet.dart +++ b/lib/views/home/tabs/kassaView/ProductAddBottomSheet.dart @@ -78,7 +78,8 @@ class _ProductAddBottomSheetState extends State { decimal: false, ), inputFormatters: [ - WhitelistingTextInputFormatter.digitsOnly + // WhitelistingTextInputFormatter.digitsOnly + FilteringTextInputFormatter.digitsOnly ], controller: countController, onChanged: calcOnChange, @@ -95,7 +96,7 @@ class _ProductAddBottomSheetState extends State { keyboardType: const TextInputType.numberWithOptions(decimal: true), inputFormatters: [ - WhitelistingTextInputFormatter(RegExp("^[0-9.]*")), + FilteringTextInputFormatter.allow(RegExp("^[0-9.]*")), ], controller: priceController, onChanged: calcOnChange, diff --git a/lib/widgets/dialog_manager.dart b/lib/widgets/dialog_manager.dart index 8380062..26dc986 100644 --- a/lib/widgets/dialog_manager.dart +++ b/lib/widgets/dialog_manager.dart @@ -122,7 +122,7 @@ class _DialogManagerState extends State { inputFormatters: [ if (request.formatType == "phone") maskFormatter, if (request.formatType == null) - WhitelistingTextInputFormatter(RegExp("^[0-9.]*")), + FilteringTextInputFormatter.allow(RegExp("^[0-9.]*")), ], ) ], diff --git a/pubspec.lock b/pubspec.lock index e5e4568..861beca 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -84,7 +84,7 @@ packages: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.2+10" + version: "1.0.0" device_info_platform_interface: dependency: transitive description: @@ -145,7 +145,7 @@ packages: name: flutter_redux url: "https://pub.dartlang.org" source: hosted - version: "0.6.0" + version: "0.7.0" flutter_screenutil: dependency: "direct main" description: @@ -169,7 +169,7 @@ packages: name: get_it url: "https://pub.dartlang.org" source: hosted - version: "4.0.4" + version: "5.0.4" google_fonts: dependency: "direct main" description: @@ -372,7 +372,7 @@ packages: name: responsive_builder url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+2" + version: "0.3.0" shared_preferences: dependency: transitive description: