flutter: Remove screen recorder

This commit is contained in:
Calcitem 2021-06-05 17:02:19 +08:00
parent c6c4d64623
commit f6d4bd03aa
2 changed files with 16 additions and 5 deletions

View File

@ -17,7 +17,8 @@
*/ */
import 'dart:async'; import 'dart:async';
import 'dart:typed_data';
//import 'dart:typed_data';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.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/services/audios.dart';
import 'package:sanmill/style/app_theme.dart'; import 'package:sanmill/style/app_theme.dart';
import 'package:sanmill/widgets/game_settings_page.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 'package:stack_trace/stack_trace.dart';
import 'board.dart'; import 'board.dart';
@ -62,10 +63,12 @@ class _GamePageState extends State<GamePage>
bool isReady = false; bool isReady = false;
bool isGoingToHistory = false; bool isGoingToHistory = false;
late Timer timer; late Timer timer;
/*
ScreenRecorderController screenRecorderController = ScreenRecorderController( ScreenRecorderController screenRecorderController = ScreenRecorderController(
pixelRatio: 1.0, pixelRatio: 1.0,
skipFramesBetweenCaptures: 0, skipFramesBetweenCaptures: 0,
); );
*/
late AnimationController _animationController; late AnimationController _animationController;
late Animation animation; late Animation animation;
bool disposed = false; bool disposed = false;
@ -540,6 +543,7 @@ class _GamePageState extends State<GamePage>
} }
} }
/*
onStartRecordingButtonPressed() async { onStartRecordingButtonPressed() async {
Navigator.of(context).pop(); Navigator.of(context).pop();
showDialog( showDialog(
@ -619,6 +623,7 @@ class _GamePageState extends State<GamePage>
}, },
); );
} }
*/
onAutoReplayButtonPressed() async { onAutoReplayButtonPressed() async {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -628,9 +633,10 @@ class _GamePageState extends State<GamePage>
} }
onGameButtonPressed() { onGameButtonPressed() {
showModalBottomSheet( //showModalBottomSheet(
showDialog(
context: context, context: context,
backgroundColor: Colors.transparent, //backgroundColor: Colors.transparent,
builder: (BuildContext context) { builder: (BuildContext context) {
return SimpleDialog( return SimpleDialog(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@ -643,6 +649,7 @@ class _GamePageState extends State<GamePage>
), ),
onPressed: onStartNewGameButtonPressed, onPressed: onStartNewGameButtonPressed,
), ),
/*
SizedBox(height: AppTheme.sizedBoxHeight), SizedBox(height: AppTheme.sizedBoxHeight),
Config.experimentsEnabled Config.experimentsEnabled
? SimpleDialogOption( ? SimpleDialogOption(
@ -680,6 +687,7 @@ class _GamePageState extends State<GamePage>
onPressed: onShowRecordingButtonPressed, onPressed: onShowRecordingButtonPressed,
) )
: SizedBox(height: 1), : SizedBox(height: 1),
*/
/* /*
SizedBox(height: AppTheme.sizedBoxHeight), SizedBox(height: AppTheme.sizedBoxHeight),
SimpleDialogOption( SimpleDialogOption(
@ -1434,6 +1442,8 @@ class _GamePageState extends State<GamePage>
return Scaffold( return Scaffold(
backgroundColor: Color(Config.darkBackgroundColor), backgroundColor: Color(Config.darkBackgroundColor),
body: Column(children: <Widget>[header, board, toolbar]),
/*
body: Column(children: <Widget>[ body: Column(children: <Widget>[
header, header,
ScreenRecorder( ScreenRecorder(
@ -1444,6 +1454,7 @@ class _GamePageState extends State<GamePage>
), ),
toolbar toolbar
]), ]),
*/
); );
} }

View File

@ -25,8 +25,8 @@ dependencies:
device_info_plus_platform_interface: ^1.0.1 device_info_plus_platform_interface: ^1.0.1
devicelocale: ^0.4.1 devicelocale: ^0.4.1
double_back_to_close_app: ^2.0.1 double_back_to_close_app: ^2.0.1
screen_recorder: ^0.0.2
flutter_picker: ^2.0.1 flutter_picker: ^2.0.1
#screen_recorder: ^0.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: