forked from JohnnyNguyen01/signal_govHack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored bottom sheet and area cards, now usable components
- Loading branch information
1 parent
1b5bb94
commit 29d7748
Showing
4 changed files
with
148 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
|
||
class AreaUpdateCard extends StatelessWidget { | ||
/* | ||
Original values | ||
color: Green.shade500 | ||
textOne: RFS has successfuly responded and | ||
textTwo: put out the small fire at 5:00pm | ||
icon: FontAwesomeIcons.checkCircle | ||
*/ | ||
|
||
String title; | ||
String textOne; | ||
String textTwo; | ||
Color color; | ||
IconData icon; | ||
|
||
AreaUpdateCard({ | ||
this.title, | ||
this.textOne, | ||
this.textTwo, | ||
this.color, | ||
this.icon, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Card( | ||
child: ClipRRect( | ||
borderRadius: BorderRadius.circular(12), | ||
child: Container( | ||
width: 320, | ||
height: 80, | ||
color: color, | ||
child: Row( | ||
children: <Widget>[ | ||
Container( | ||
margin: EdgeInsets.only(left: 8), | ||
child: FaIcon( | ||
icon, | ||
color: Colors.white, | ||
size: 40, | ||
), | ||
), | ||
Container( | ||
margin: EdgeInsets.only(left: 8), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: <Widget>[ | ||
Text( | ||
title, | ||
style: TextStyle( | ||
fontSize: 18, | ||
fontWeight: FontWeight.w600, | ||
color: Colors.white), | ||
), | ||
Text( | ||
textOne, | ||
style: TextStyle(color: Colors.white), | ||
), | ||
Text( | ||
textTwo, | ||
style: TextStyle(color: Colors.white), | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
import 'package:signal_flutter_v2/components/area_update_card.dart'; | ||
|
||
final sydney = [ | ||
AreaUpdateCard( | ||
title: "Area now declared SAFE", | ||
color: Colors.green.shade500, | ||
textOne: "RFS has successfuly responded and", | ||
textTwo: "put out the small fire at 5:00pm", | ||
icon: FontAwesomeIcons.checkCircle, | ||
), | ||
AreaUpdateCard( | ||
title: "Area now declared DANGEROUS", | ||
textOne: "RFS Alerted to the scene", | ||
textTwo: "mild fire ", | ||
icon: FontAwesomeIcons.bell, | ||
color: Colors.red.shade700, | ||
), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters