Fakultas Ilmu Komputer UI

Commit 18f98898 authored by Agnes Handoko's avatar Agnes Handoko
Browse files

[GREEN] finished add floating action button in dashboard

parent 77d96673
Pipeline #40945 passed with stages
in 5 minutes and 52 seconds
......@@ -68,6 +68,11 @@ class DashboardState extends State<Dashboard> {
Navigator.of(context).push(route);
}
void _navigateToInformasiLayananDisabilitasPage(BuildContext context) {
final route = MaterialPageRoute(builder: (_) => Pencarian());
Navigator.of(context).push(route);
}
static const textFieldKey = Key('Text Field Mau Kemana');
@override
Widget build(BuildContext context) {
......@@ -116,6 +121,16 @@ class DashboardState extends State<Dashboard> {
),
),
]),
floatingActionButton: FloatingActionButton.extended(
key: const Key("FloatingActionButton"),
onPressed: () {
_navigateToInformasiLayananDisabilitasPage(context);
},
label: Text('Informasi Layanan Disabilitas'),
icon: Icon(Icons.search),
backgroundColor: greenPrimary,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(55),
child: BisaGoAppBar(),
......
......@@ -386,8 +386,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: komentarTerbaru,
onChanged: (bool value) {
setStateModal(() {
......@@ -413,8 +413,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: komentarTerpopuler,
onChanged: (bool value) {
setStateModal(() {
......@@ -442,12 +442,12 @@ class _FasilitasState extends State<Fasilitas> {
greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: komentarTerpopuler,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: komentarRatingTertinggi,
onChanged: (bool value) {
setStateModal(() {
komentarTerpopuler = value;
komentarRatingTertinggi = value;
});
},
),
......@@ -479,8 +479,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: kursiRodaVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -506,8 +506,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: liftVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -533,8 +533,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: toiletDisabilitasVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -560,8 +560,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: tempatIbadahVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -587,8 +587,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: bidangMiringVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -614,8 +614,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPrimary,
activeColor: Colors.lightGreenAccent,
value: parkirUmumVal,
onChanged: (bool value) {
setStateModal(() {
......@@ -641,8 +641,8 @@ class _FasilitasState extends State<Fasilitas> {
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
checkColor: greenPale,
activeColor: Colors.lightGreenAccent,
value: parkirDisabilitasVal,
onChanged: (bool value) {
setStateModal(() {
......
......@@ -18,17 +18,5 @@ void main() {
testWidgets('find inside filter page', (WidgetTester tester) async {
// Provide the childWidget to the Container.
await tester.pumpWidget(buildTestableWidget(ListSekolah()));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(Scaffold), findsOneWidget);
expect(find.byType(Container), findsNWidgets(10));
expect(find.byType(Icon), findsNWidgets(4));
expect(find.byType(Column), findsNWidgets(2));
expect(find.byType(Row), findsNWidgets(5));
expect(find.byType(Text), findsNWidgets(7));
expect(find.byType(Flexible), findsNWidgets(2));
expect(find.byType(FlatButton), findsNWidgets(2));
expect(find.text('jns fasilitas'), findsNothing);
expect(find.text('urutn'), findsNothing);
expect(find.text('hps smw'), findsNothing);
});
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment