Limit max account dialog width (mainly for tablets)

This commit is contained in:
Ming Ming 2023-08-05 03:13:06 +08:00
parent c304011ea3
commit dfe03caf73

View file

@ -91,6 +91,8 @@ class _WrappedAccountPickerDialog extends StatelessWidget {
], ],
child: Dialog( child: Dialog(
insetPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 24), insetPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 24),
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 512),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: ClipRRect( child: ClipRRect(
@ -136,8 +138,8 @@ class _WrappedAccountPickerDialog extends StatelessWidget {
const _AccountDropdown(), const _AccountDropdown(),
if (state.isOpenDropdown) ...[ if (state.isOpenDropdown) ...[
...state.accounts ...state.accounts
.where( .where((a) =>
(a) => a.id != bloc.activeAccount.id) a.id != bloc.activeAccount.id)
.map((a) => _AccountView(account: a)), .map((a) => _AccountView(account: a)),
const _NewAccountView(), const _NewAccountView(),
] else ] else
@ -188,6 +190,7 @@ class _WrappedAccountPickerDialog extends StatelessWidget {
), ),
), ),
), ),
),
); );
} }