File tree 7 files changed +39
-10
lines changed
fastlane/metadata/android/en-US/changelogs
7 files changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -428,4 +428,8 @@ class CurrentIndexCubit extends Cubit<CurrentIndex> {
428
428
void removeButtons () {
429
429
emit (state.copyWith (buttons: null ));
430
430
}
431
+
432
+ void resetInput () {
433
+ emit (state.copyWith (buttons: null , pointers: []));
434
+ }
431
435
}
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import 'package:butterfly/models/document.dart';
6
6
import 'package:butterfly/models/template.dart' ;
7
7
import 'package:flutter/material.dart' ;
8
8
import 'package:flutter_bloc/flutter_bloc.dart' ;
9
- import 'package:go_router/go_router.dart' ;
10
9
import 'package:flutter_gen/gen_l10n/app_localizations.dart' ;
10
+ import 'package:go_router/go_router.dart' ;
11
11
import 'package:phosphor_flutter/phosphor_flutter.dart' ;
12
12
13
13
import '../../api/format_date_time.dart' ;
@@ -164,7 +164,6 @@ class _CreateStartViewState extends State<_CreateStartView> {
164
164
createdAt: DateTime .now (),
165
165
);
166
166
167
- bloc.clearHistory ();
168
167
transformCubit.reset ();
169
168
currentIndexCubit.reset (document);
170
169
bloc.emit (DocumentLoadSuccess (document,
@@ -175,6 +174,7 @@ class _CreateStartViewState extends State<_CreateStartView> {
175
174
'' ),
176
175
currentIndexCubit: currentIndexCubit,
177
176
settingsCubit: settingsCubit));
177
+ bloc.clearHistory ();
178
178
await bloc.load ();
179
179
});
180
180
},
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import 'setup.dart' if (dart.library.html) 'setup_web.dart';
25
25
import 'theme/manager.dart' ;
26
26
import 'views/main.dart' ;
27
27
28
- const kFileVersion = 6 ;
28
+ const kFileVersion = 5 ;
29
29
Future <void > main ([List <String > args = const []]) async {
30
30
WidgetsFlutterBinding .ensureInitialized ();
31
31
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ class MainViewViewport extends StatefulWidget {
21
21
22
22
enum _MouseState { normal, inverse, scale }
23
23
24
- class _MainViewViewportState extends State <MainViewViewport > {
24
+ class _MainViewViewportState extends State <MainViewViewport >
25
+ with WidgetsBindingObserver {
25
26
double size = 1.0 ;
26
27
GlobalKey paintKey = GlobalKey ();
27
28
_MouseState _mouseState = _MouseState .normal;
@@ -43,6 +44,15 @@ class _MainViewViewportState extends State<MainViewViewport> {
43
44
super .dispose ();
44
45
}
45
46
47
+ @override
48
+ void didChangeAppLifecycleState (AppLifecycleState state) {
49
+ if (state == AppLifecycleState .resumed) {
50
+ context.read <DocumentBloc >().refresh ();
51
+ } else {
52
+ context.read <CurrentIndexCubit >().resetInput ();
53
+ }
54
+ }
55
+
46
56
void _handleKey (RawKeyEvent event) {
47
57
if (event.data.isShiftPressed) {
48
58
_mouseState = _MouseState .inverse;
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ packages:
315
315
name: espresso
316
316
url: "https://pub.dartlang.org"
317
317
source: hosted
318
- version: "0.2.0+3 "
318
+ version: "0.2.0+4 "
319
319
fake_async:
320
320
dependency: transitive
321
321
description:
@@ -357,7 +357,14 @@ packages:
357
357
name: flex_color_scheme
358
358
url: "https://pub.dartlang.org"
359
359
source: hosted
360
- version: "5.1.0"
360
+ version: "6.0.0"
361
+ flex_seed_scheme:
362
+ dependency: transitive
363
+ description:
364
+ name: flex_seed_scheme
365
+ url: "https://pub.dartlang.org"
366
+ source: hosted
367
+ version: "1.0.0"
361
368
flutter:
362
369
dependency: "direct main"
363
370
description: flutter
@@ -1262,5 +1269,5 @@ packages:
1262
1269
source: hosted
1263
1270
version: "0.1.0"
1264
1271
sdks:
1265
- dart: ">=2.17 .0 <3.0.0"
1266
- flutter: ">=3.0 .0"
1272
+ dart: ">=2.18 .0 <3.0.0"
1273
+ flutter: ">=3.3 .0"
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dependencies:
41
41
camera : ^0.10.0+1
42
42
camera_windows : ^0.2.1+1
43
43
window_manager : ^0.2.7
44
- flex_color_scheme : ^5.1 .0
44
+ flex_color_scheme : ^6.0 .0
45
45
freezed_annotation : ^2.1.0
46
46
json_annotation : ^4.6.0
47
47
path : ^1.8.1
@@ -70,7 +70,7 @@ dev_dependencies:
70
70
freezed : ^2.1.0+1
71
71
build_runner : ^2.2.0
72
72
json_serializable : ^6.3.1
73
- espresso : ^0.2.0+3
73
+ espresso : ^0.2.0+4
74
74
75
75
# For information on the generic Dart part of this file, see the
76
76
# following page: https://dart.dev/tools/pub/pubspec
Original file line number Diff line number Diff line change
1
+ * Add temporary painter
2
+ * Add new painters
3
+ * Hand
4
+ * Undo
5
+ * Redo
6
+ * Remove hand, undo, redo buttons from general gui
7
+ * Improve UI and UX problems ([#280](https://github.com/LinwoodCloud/Butterfly/issues/280))
8
+ * Reset pointer on app hide
You can’t perform that action at this time.
0 commit comments