diff --git a/android/gradle.properties b/android/gradle.properties index c184c0bc09dc6bc09e5ec970a41248f9de23f8c1..6c74aa0cfdc459c0709940ec7fcf37bff56804d0 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=1.0.31 -app.versionCode=32 +app.versionName=1.0.32 +app.versionCode=33 diff --git a/lib/ui/skeleton.dart b/lib/ui/skeleton.dart index e8493f17b0588a3ccbd126059060385aa0dabbe2..01f8cca5fd7dc6e9cfbc164a0a41cd28b8dac4a0 100644 --- a/lib/ui/skeleton.dart +++ b/lib/ui/skeleton.dart @@ -9,6 +9,7 @@ import 'package:random/ui/screens/graph_page.dart'; import 'package:random/ui/screens/settings_page.dart'; import 'package:random/ui/widgets/app_bar.dart'; import 'package:random/ui/widgets/bottom_nav_bar.dart'; +import 'package:random/ui/widgets/debug_bloc.dart'; class SkeletonScreen extends StatefulWidget { const SkeletonScreen({super.key}); @@ -27,6 +28,8 @@ class _SkeletonScreenState extends State<SkeletonScreen> { AboutPage(), ]; + String debug = ''; + return BlocProvider<SettingsCubit>( create: (BuildContext context) => SettingsCubit(), child: BlocProvider<BottomNavCubit>( @@ -35,6 +38,9 @@ class _SkeletonScreenState extends State<SkeletonScreen> { builder: (BuildContext context, int state) { return GestureDetector( onHorizontalDragEnd: (dragDetail) { + debug = dragDetail.velocity.pixelsPerSecond.toString(); + print('debug: ' + debug); + if (dragDetail.velocity.pixelsPerSecond.dx < 1) { context.read<BottomNavCubit>().moveNext(); } else { @@ -48,7 +54,12 @@ class _SkeletonScreenState extends State<SkeletonScreen> { builder: (BuildContext context, int state) { return AnimatedSwitcher( duration: const Duration(milliseconds: 300), - child: pageNavigation.elementAt(state), + child: Stack( + children: [ + pageNavigation.elementAt(state), + debug != '' ? DebugBloc(content: debug) : SizedBox(), + ], + ), ); }, ), diff --git a/lib/ui/widgets/debug_bloc.dart b/lib/ui/widgets/debug_bloc.dart new file mode 100644 index 0000000000000000000000000000000000000000..502baccfe0ea57b4b3c9bac387a9ea151e0915c0 --- /dev/null +++ b/lib/ui/widgets/debug_bloc.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; + +class DebugBloc extends StatelessWidget { + const DebugBloc({super.key, required this.content}); + + final String content; + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Colors.red, + border: Border.all( + color: Colors.grey, + width: 2, + ), + ), + child: Padding( + padding: EdgeInsets.all(5), + child: Text( + content, + textAlign: TextAlign.start, + style: TextStyle(fontSize: 13), + ), + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index f98000d3db47ac0fb5d4c74ae01d22d7b954085d..fcec92610e135213f88202653d2d174bed2654b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A random application, for testing purpose only. publish_to: 'none' -version: 1.0.31+32 +version: 1.0.32+33 environment: sdk: '^3.0.0'