diff --git a/lib/pages/detail.dart b/lib/pages/detail.dart index 3f84b1a..4335a6a 100644 --- a/lib/pages/detail.dart +++ b/lib/pages/detail.dart @@ -88,12 +88,6 @@ class _DetailPageState extends State { required BuildContext context, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceAround, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center}) { - // if (false && MediaQuery.of(context).size.width > 600) { - // return Row( - // mainAxisAlignment: mainAxisAlignment, - // crossAxisAlignment: crossAxisAlignment, - // children: children); - // } return Column( mainAxisAlignment: mainAxisAlignment, crossAxisAlignment: crossAxisAlignment, @@ -202,7 +196,6 @@ class _DetailPageState extends State { padding: const EdgeInsets.all(20), child: SizedBox( width: MediaQuery.sizeOf(context).width, - // height: MediaQuery.sizeOf(context).height, child: _buildRowOrCol( context: context, mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -288,12 +281,14 @@ class _DetailPageState extends State { : categoryName!) : ''), backgroundColor: Colors.white, + labelStyle: + const TextStyle(color: Colors.black), ), ), ), Center( child: MarkdownBody( - data: '### Отстаток: _${item!.count}_', + data: '### Остаток: _${item!.count}_', )), item!.description != '' ? Padding( diff --git a/lib/states/mobile.dart b/lib/states/mobile.dart index 7900cf8..9c33591 100644 --- a/lib/states/mobile.dart +++ b/lib/states/mobile.dart @@ -19,6 +19,9 @@ class MyAppStateMobile extends State { : MaterialApp( title: 'GymLink Module', theme: theme, + themeMode: context.read().blackTheme + ? ThemeMode.dark + : ThemeMode.light, debugShowCheckedModeBanner: false, home: const MainPage(), ), diff --git a/lib/theme.dart b/lib/theme.dart index 2732184..def7c3c 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -13,7 +13,7 @@ ThemeData getThemeData(Color color, bool dark) { ).copyWith( onPrimary: dark ? materialColor[600] : Colors.white, ), - useMaterial3: true, + // useMaterial3: true, ); } diff --git a/web/js/demo-js-interop.js b/web/js/demo-js-interop.js index 2912f8a..fd87528 100644 --- a/web/js/demo-js-interop.js +++ b/web/js/demo-js-interop.js @@ -38,18 +38,14 @@ let colorChangeBtnRed = document.getElementById('colorChangeBtnRed'); colorChangeBtnRed.addEventListener('click', function () { - var hexColor = '#FF0000' - .replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (m, r, g, b) => '#ff' + r + r + g + g + b + b) - .substring(1); + var hexColor = '#FF0000'.substring(1); var numColor = parseInt(hexColor, 16); appState.changeColor(numColor, true); }); let colorChangeBtnBlue = document.getElementById('colorChangeBtnBlue'); colorChangeBtnBlue.addEventListener('click', function () { - var hexColor = '#0000FF' - .replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (m, r, g, b) => '#ff' + r + r + g + g + b + b) - .substring(1); + var hexColor = '#0000FF'.substring(1); var numColor = parseInt(hexColor, 16); appState.changeColor(numColor, false); }); @@ -60,7 +56,7 @@ }); function onError() { - console.error('aboba'); + console.error('Error'); } appState.setOnError(onError);