Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasn committed Dec 31, 2023
1 parent 26eab06 commit 73d8863
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion lib/widgets/app_bar/title_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class BackWidget extends StatelessWidget {
cursor: SystemMouseCursors.click,
child: Row(
children: [
const SizedBox(width: 10),
const SizedBox(width: 9),
const Icon(
Icons.chevron_left,
size: 30,
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/charts/dashboard_workout_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class WorkoutChartInfoWidget extends StatelessWidget {
top: 0,
left: 20,
child: SizedBox(
width: max(MediaQuery.of(context).size.width, 320) - 20,
width: max(MediaQuery.of(context).size.width, 350) - 20,
child: IgnorePointer(
child: Row(
children: [
Expand Down
34 changes: 18 additions & 16 deletions lib/widgets/sync/imap_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ class _ImapConfigWidgetState extends State<ImapConfigWidget> {
}
return BlocBuilder<SyncConfigCubit, SyncConfigState>(
builder: (context, SyncConfigState state) {
return SizedBox(
width: 320,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const ImapConfigForm(),
const SizedBox(height: 32),
const ImapConfigStatus(),
const SizedBox(height: 32),
const ImapConfigActions(),
state.maybeWhen(
orElse: () => const SizedBox.shrink(),
empty: () => const EmptyConfigWidget(),
),
],
return SingleChildScrollView(
child: SizedBox(
width: 320,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const ImapConfigForm(),
const SizedBox(height: 32),
const ImapConfigStatus(),
const SizedBox(height: 32),
const ImapConfigActions(),
state.maybeWhen(
orElse: () => const SizedBox.shrink(),
empty: () => const EmptyConfigWidget(),
),
],
),
),
);
},
Expand Down
49 changes: 23 additions & 26 deletions lib/widgets/sync/imap_config_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,30 @@ class _ImapConfigFormState extends State<ImapConfigForm> {

return BlocBuilder<SyncConfigCubit, SyncConfigState>(
builder: (context, SyncConfigState state) {
return SizedBox(
height: 330,
child: state.when(
configured: (cfg, _) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapSaved: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapValid: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapTesting: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapInvalid: (cfg, _) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
loading: () => const SizedBox.shrink(),
generating: () => ConfigForm(formKey: formKey),
empty: () => ConfigForm(formKey: formKey),
return state.when(
configured: (cfg, _) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapSaved: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapValid: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapTesting: (cfg) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
imapInvalid: (cfg, _) => ConfigForm(
formKey: formKey,
imapConfig: cfg,
),
loading: () => const SizedBox.shrink(),
generating: () => ConfigForm(formKey: formKey),
empty: () => ConfigForm(formKey: formKey),
);
},
);
Expand Down

0 comments on commit 73d8863

Please sign in to comment.