@@ -5,38 +5,21 @@ import 'package:flutter_bloc/flutter_bloc.dart';
55class OnGoingPage extends StatelessWidget {
66 const OnGoingPage ({super .key});
77
8- @override
9- Widget build (BuildContext context) {
10- return const Scaffold (
11- body: OnGoingScreen (),
12- floatingActionButton: _FloatingActionButton (),
13- );
14- }
15- }
16-
17- class _FloatingActionButton extends StatelessWidget {
18- const _FloatingActionButton ();
19-
208 @override
219 Widget build (BuildContext context) {
2210 ThemeData theme = Theme .of (context);
23- return ElevatedButton .icon (
24- onPressed: () {
25- Navigator .push (context, AddWishPage .route ()).then (
26- (_) {
27- context.read <OnGoingBloc >().add (FetchWishEvent ());
28- },
29- );
30- },
31- style: ElevatedButton .styleFrom (
32- backgroundColor: theme.colorScheme.primary,
33- foregroundColor: theme.colorScheme.onPrimary,
34- shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (15 )),
35- padding: const EdgeInsets .all (16 ),
11+ return Scaffold (
3612 backgroundColor: theme.colorScheme.surface,
13+ body: const OnGoingScreen (),
14+ floatingActionButton: FloatingActionButton .extended (
15+ onPressed: () {
16+ Navigator .push (context, AddWishPage .route ()).then (
17+ (_) => context.read <OnGoingBloc >().add (FetchWishEvent ()),
18+ );
19+ },
20+ label: const Text ('Tambah Celengan' , style: TextStyle (fontWeight: FontWeight .bold)),
21+ icon: const Icon (Icons .add),
3722 ),
38- icon: const Icon (Icons .add),
39- label: const Text ("Tambah Celengan" , style: TextStyle (fontWeight: FontWeight .bold)),
4023 );
4124 }
4225}
0 commit comments