Fakultas Ilmu Komputer UI

Commit 7ea822a3 authored by Agnes Handoko's avatar Agnes Handoko
Browse files

[GREEN] finished make fasilitas page and already passed all test in local

parent 6d9e5524
Pipeline #35442 passed with stages
in 2 minutes and 29 seconds
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
//import 'package:ppl_disabilitas/page/filter & fasilitas/fasilitas.dart';
class BisaGo extends StatelessWidget {
@override
......
......@@ -13,9 +13,25 @@ final double spaceFourtyEight = 48.0;
final List<BoxShadow> regularShadow = [
BoxShadow(
blurRadius: 4,
color: Colors.black.withOpacity(0.25),
offset: Offset(0, 0))
color: Colors.black.withOpacity(0.25),
blurRadius: 7.0, // has the effect of softening the shadow
offset: Offset(
5.0, // horizontal, move right 10
5.0, // vertical, move down 10
),
)
];
final List<BoxShadow> smallShadow = [
BoxShadow(
color: Colors.black.withOpacity(0.25),
blurRadius: 2.0, // has the effect of softening the shadow
offset: Offset(
1.5, // horizontal, move right 10
1.5, // vertical, move down 10
),
)
];
final BorderRadius regularBorderRadius = BorderRadius.circular(10);
final BorderRadius doubleBorderRadius = BorderRadius.circular(20);
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/component/bisago_appbar.dart';
import 'package:ppl_disabilitas/component/bisago_drawer.dart';
import 'package:ppl_disabilitas/config/styles.dart';
class Fasilitas extends StatefulWidget {
@override
_FasilitasState createState() => _FasilitasState();
}
class _FasilitasState extends State<Fasilitas> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
drawer: BisaGoDrawer(),
body: ListView(children: <Widget>[
Container(
child: Image.asset('assets/images/margocity.jpg'),
),
Container(
padding: EdgeInsets.all(doubleSpace),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Margo City',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w800,
color: Colors.black,
fontFamily: 'Muli',
),
),
Container(
margin: EdgeInsets.only(
top: regularSpace, bottom: regularSpace, left: smallSpace),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Icon(Icons.place, color: Colors.black, size: 20),
Flexible(
child: Text(
'Jl. Margonda Raya No.358, Kemiri Muka, Kecamatan Beji, Kota Depok, Jawa Barat 16423',
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 15,
color: Colors.black,
fontFamily: 'Muli',
),
),
),
],
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Icon(
Icons.local_phone,
color: Colors.black,
size: 20,
),
Flexible(
child: Text(
'+6289535205205',
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 15,
color: Colors.black,
fontFamily: 'Muli',
),
),
),
],
),
Container(
margin: EdgeInsets.only(
top: doubleSpace, bottom: doubleSpace, left: smallSpace),
decoration: new BoxDecoration(boxShadow: regularShadow),
child: SizedBox(
width: double.infinity,
child: FlatButton(
color: Colors.green[700],
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.black,
padding: EdgeInsets.all(8),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10),
side: BorderSide(color: Colors.transparent)),
splashColor: Colors.lightGreen,
onPressed: () {
/*...*/
},
child: Text(
"Tambah Informasi",
style: TextStyle(fontSize: 20),
),
),
),
),
Container(
margin: EdgeInsets.only(bottom: doubleSpace),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Fasilitas',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w800,
color: Colors.black,
fontFamily: 'Muli',
),
),
Container(
decoration: new BoxDecoration(boxShadow: regularShadow),
child: FlatButton(
color: Colors.green[700],
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.black,
padding: EdgeInsets.all(8),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10),
side: BorderSide(color: Colors.transparent)),
splashColor: Colors.lightGreen,
onPressed: () {
/*...*/
},
child: Row(
children: <Widget>[
Icon(Icons.filter_list,
color: Colors.white, size: 20),
Text(
"Filter Informasi",
style: TextStyle(fontSize: 13),
),
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: regularSpace),
padding: EdgeInsets.all(doubleSpace),
decoration: new BoxDecoration(
boxShadow: regularShadow,
border: Border.all(
width: 2, color: greenPrimary.withOpacity(0.4)),
borderRadius: BorderRadius.all(
Radius.circular(10) // <--- border radius here
),
color: Colors.white,
),
child: Column(
children: <Widget>[
Container(
margin: EdgeInsets.only(bottom: regularSpace),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Afrah Hardian',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w800,
color: Colors.black,
fontFamily: 'Muli',
),
),
Row(
children: <Widget>[
Container(
margin:
EdgeInsets.only(right: regularSpace),
child: Row(
children: <Widget>[
Icon(Icons.thumb_up,
color: Colors.green[800], size: 20),
Text(
'20 suka',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.green[800],
),
),
],
)),
Icon(Icons.thumb_down,
color: Colors.red[800], size: 20),
Text(
'1 tidak suka',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.red[800],
),
),
],
)
],
),
),
Container(
margin: EdgeInsets.only(bottom: regularSpace),
child: ClipRRect(
borderRadius: BorderRadius.circular(5),
child:
Image.asset('assets/images/disabletoilet.jpg'),
)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Flexible(
child: Text(
'Ada toilet khusus disabilitas terletak di lantai 2 dekat kintan, kondisinya bagus dan bersih layak pak.',
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 15,
color: Colors.black,
fontFamily: 'Muli',
),
),
),
],
),
Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: regularSpace, right: regularSpace),
padding: EdgeInsets.all(6),
decoration: new BoxDecoration(
boxShadow: smallShadow,
border: Border.all(
width: 2,
color: greenPrimary.withOpacity(0.4)),
borderRadius: BorderRadius.all(Radius.circular(
10) // <--- border radius here
),
color: Colors.white,
),
child: Text(
'#toiletdisabilitas',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w800,
color: greenPrimary,
fontFamily: 'Muli',
),
),
),
Container(
margin: EdgeInsets.only(top: regularSpace),
padding: EdgeInsets.all(6),
decoration: new BoxDecoration(
boxShadow: smallShadow,
border: Border.all(
width: 2,
color: greenPrimary.withOpacity(0.4)),
borderRadius: BorderRadius.all(Radius.circular(
10) // <--- border radius here
),
color: Colors.white,
),
child: Text(
'#kursiroda',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w800,
color: greenPrimary,
fontFamily: 'Muli',
),
),
),
],
),
],
)),
],
),
),
]),
appBar: PreferredSize(
preferredSize: Size.fromHeight(55),
child: BisaGoAppBar(),
key: Key('Scaffold Text Field'),
),
);
}
}
......@@ -59,6 +59,8 @@ flutter:
- assets/icon/loc.png
- assets/icon/current_loc.png
- assets/icon/icon_launcher.png
- assets/images/margocity.jpg
- assets/images/disabletoilet.jpg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
......
......@@ -16,8 +16,14 @@ void main() {
// Provide the childWidget to the Container.
await tester.pumpWidget(MaterialApp(home: Fasilitas()));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(Container), findsNWidgets(7));
expect(find.byType(Icon), findsNWidgets(5));
expect(find.byType(Scaffold), findsOneWidget);
expect(find.byType(Container), findsNWidgets(14));
expect(find.byType(Icon), findsNWidgets(6));
expect(find.byType(Column), findsNWidgets(2));
expect(find.byType(Row), findsNWidgets(10));
expect(find.byType(Text), findsNWidgets(13));
expect(find.byType(Flexible), findsNWidgets(3));
expect(find.byType(FlatButton), findsNWidgets(2));
});
}
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