pull/438/head
Jorge Coca 3 years ago
parent 632c2dc95e
commit 62f9535797

@ -34,7 +34,7 @@ class AssetsManagerCubit extends Cubit<AssetsManagerState> {
try { try {
await loadable; await loadable;
emit(state.copyWith(loaded: [...state.loaded, loadable])); emit(state.copyWith(loaded: [...state.loaded, loadable]));
} catch (error, stackTrace) { } catch (error, _) {
emit(state.copyWith(error: '$error')); emit(state.copyWith(error: '$error'));
} }
}).toList(); }).toList();

@ -19,7 +19,8 @@ class AssetsLoadingPage extends StatelessWidget {
final headline1 = Theme.of(context).textTheme.headline1; final headline1 = Theme.of(context).textTheme.headline1;
return BlocBuilder<AssetsManagerCubit, AssetsManagerState>( return BlocBuilder<AssetsManagerCubit, AssetsManagerState>(
builder: (context, state) { builder: (context, state) {
return Container( return SingleChildScrollView(
child: Container(
decoration: const CrtBackground(), decoration: const CrtBackground(),
child: Center( child: Center(
child: Column( child: Column(
@ -42,11 +43,24 @@ class AssetsLoadingPage extends StatelessWidget {
if (state.error != null) if (state.error != null)
Text( Text(
state.error!, state.error!,
style: Theme.of(context).textTheme.headline4, style: Theme.of(context)
.textTheme
.headline4!
.copyWith(color: PinballColors.red),
),
...state.loaded.map(
(e) => Text(
e.toString(),
style: Theme.of(context)
.textTheme
.headline4!
.copyWith(color: PinballColors.white),
),
), ),
], ],
), ),
), ),
),
); );
}, },
); );

Loading…
Cancel
Save