From f6d4bd03aa9d00055e76542518bd75512d39aa63 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 5 Jun 2021 17:02:19 +0800 Subject: [PATCH] flutter: Remove screen recorder --- src/ui/flutter_app/lib/widgets/game_page.dart | 19 +++++++++++++++---- src/ui/flutter_app/pubspec.yaml | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/ui/flutter_app/lib/widgets/game_page.dart b/src/ui/flutter_app/lib/widgets/game_page.dart index e3036cad..261c5296 100644 --- a/src/ui/flutter_app/lib/widgets/game_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_page.dart @@ -17,7 +17,8 @@ */ import 'dart:async'; -import 'dart:typed_data'; + +//import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -33,7 +34,7 @@ import 'package:sanmill/mill/types.dart'; import 'package:sanmill/services/audios.dart'; import 'package:sanmill/style/app_theme.dart'; import 'package:sanmill/widgets/game_settings_page.dart'; -import 'package:screen_recorder/screen_recorder.dart'; +//import 'package:screen_recorder/screen_recorder.dart'; import 'package:stack_trace/stack_trace.dart'; import 'board.dart'; @@ -62,10 +63,12 @@ class _GamePageState extends State bool isReady = false; bool isGoingToHistory = false; late Timer timer; + /* ScreenRecorderController screenRecorderController = ScreenRecorderController( pixelRatio: 1.0, skipFramesBetweenCaptures: 0, ); + */ late AnimationController _animationController; late Animation animation; bool disposed = false; @@ -540,6 +543,7 @@ class _GamePageState extends State } } + /* onStartRecordingButtonPressed() async { Navigator.of(context).pop(); showDialog( @@ -619,6 +623,7 @@ class _GamePageState extends State }, ); } + */ onAutoReplayButtonPressed() async { Navigator.of(context).pop(); @@ -628,9 +633,10 @@ class _GamePageState extends State } onGameButtonPressed() { - showModalBottomSheet( + //showModalBottomSheet( + showDialog( context: context, - backgroundColor: Colors.transparent, + //backgroundColor: Colors.transparent, builder: (BuildContext context) { return SimpleDialog( backgroundColor: Colors.transparent, @@ -643,6 +649,7 @@ class _GamePageState extends State ), onPressed: onStartNewGameButtonPressed, ), + /* SizedBox(height: AppTheme.sizedBoxHeight), Config.experimentsEnabled ? SimpleDialogOption( @@ -680,6 +687,7 @@ class _GamePageState extends State onPressed: onShowRecordingButtonPressed, ) : SizedBox(height: 1), + */ /* SizedBox(height: AppTheme.sizedBoxHeight), SimpleDialogOption( @@ -1434,6 +1442,8 @@ class _GamePageState extends State return Scaffold( backgroundColor: Color(Config.darkBackgroundColor), + body: Column(children: [header, board, toolbar]), + /* body: Column(children: [ header, ScreenRecorder( @@ -1444,6 +1454,7 @@ class _GamePageState extends State ), toolbar ]), + */ ); } diff --git a/src/ui/flutter_app/pubspec.yaml b/src/ui/flutter_app/pubspec.yaml index 6e99a3d7..9602735c 100644 --- a/src/ui/flutter_app/pubspec.yaml +++ b/src/ui/flutter_app/pubspec.yaml @@ -25,8 +25,8 @@ dependencies: device_info_plus_platform_interface: ^1.0.1 devicelocale: ^0.4.1 double_back_to_close_app: ^2.0.1 - screen_recorder: ^0.0.2 flutter_picker: ^2.0.1 + #screen_recorder: ^0.0.2 dev_dependencies: flutter_test: