Skip to content

Commit

Permalink
chore: theme upload preview widget
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wallen committed Jun 29, 2023
1 parent 86d1f82 commit 01892ab
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@ class _ThemeUploadWidgetState extends State<ThemeUploadWidget> {
state.when(
uninitialized: () => null,

Check warning on line 34 in frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart

View check run for this annotation

Codecov / codecov/patch

frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart#L34

Added line #L34 was not covered by tests
ready: (plugins) {
child = const UploadNewThemeWidget();
child =
const UploadNewThemeWidget(key: Key('upload_new_theme_widget'));
},
deletionSuccess: () {
child = const UploadNewThemeWidget();
child =

Check warning on line 40 in frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart

View check run for this annotation

Codecov / codecov/patch

frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart#L39-L40

Added lines #L39 - L40 were not covered by tests
const UploadNewThemeWidget(key: Key('upload_new_theme_widget'));
},
processing: () {
child = const ThemeUploadLoadingWidget();
child = const ThemeUploadLoadingWidget(

Check warning on line 44 in frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart

View check run for this annotation

Codecov / codecov/patch

frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart#L43-L44

Added lines #L43 - L44 were not covered by tests
key: Key('upload_theme_loading_widget'),
);
},
compilationFailure: (path) {
child = const ThemeUploadFailureWidget();
child = const ThemeUploadFailureWidget(

Check warning on line 49 in frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart

View check run for this annotation

Codecov / codecov/patch

frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_view.dart#L48-L49

Added lines #L48 - L49 were not covered by tests
key: Key('upload_theme_failure_widget'),
);
},
compilationSuccess: () {
ScaffoldMessenger.of(context).showSnackBar(
Expand All @@ -59,7 +65,8 @@ class _ThemeUploadWidgetState extends State<ThemeUploadWidget> {
});
}

Widget child = const UploadNewThemeWidget();
Widget child =
const UploadNewThemeWidget(key: Key('upload_new_theme_widget'));

@override
Widget build(BuildContext context) {
Expand Down

0 comments on commit 01892ab

Please sign in to comment.