Fakultas Ilmu Komputer UI

Commit 8969d79c authored by Fakhira Devina's avatar Fakhira Devina
Browse files

[REFACTOR] pass linter

parent 0afb43bf
Pipeline #38674 failed with stages
in 3 minutes and 49 seconds
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"google_maps_flutter","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-0.5.24+1\\\\","dependencies":[]},{"name":"location","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-2.5.3\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.5\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-1.0.6\\\\","dependencies":[]},{"name":"google_maps_flutter","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-0.5.24+1\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-2.5.3\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.5\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-04-07 00:47:59.249495","version":"1.15.17"} {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"google_maps_flutter","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-0.5.24+1\\\\","dependencies":[]},{"name":"location","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-2.5.3\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.5\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-1.0.6\\\\","dependencies":[]},{"name":"google_maps_flutter","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-0.5.24+1\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-2.5.3\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.5\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-1.3.0\\\\","dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-04-07 01:23:10.522134","version":"1.15.17"}
\ No newline at end of file \ No newline at end of file
...@@ -65,8 +65,6 @@ class CookiesInterface { ...@@ -65,8 +65,6 @@ class CookiesInterface {
await checkCookieFileAvailability(fileName: "searchhistory").then((available) async { await checkCookieFileAvailability(fileName: "searchhistory").then((available) async {
if (available) { if (available) {
await getCookieFile(fileName: "searchhistory").then((cookie) { await getCookieFile(fileName: "searchhistory").then((cookie) {
bool test = cookie == null;
print("$cookie");
if (cookie == null) { if (cookie == null) {
currentSearchHistory = []; currentSearchHistory = [];
} else { } else {
...@@ -94,10 +92,8 @@ class CookiesInterface { ...@@ -94,10 +92,8 @@ class CookiesInterface {
File file = File("${dir.path}/$fileName.json"); File file = File("${dir.path}/$fileName.json");
dynamic res; dynamic res;
try { try {
print('woyyy');
res = file.readAsStringSync(); res = file.readAsStringSync();
print(res == ""); } on Exception {
} on Exception catch(e) {
res = []; res = [];
} }
return res; return res;
......
...@@ -5,7 +5,6 @@ import 'package:ppl_disabilitas/component/bisago_appbar.dart'; ...@@ -5,7 +5,6 @@ import 'package:ppl_disabilitas/component/bisago_appbar.dart';
import 'package:ppl_disabilitas/component/bisago_drawer.dart'; import 'package:ppl_disabilitas/component/bisago_drawer.dart';
import 'package:ppl_disabilitas/config/styles.dart'; import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/network/data/network_model.dart'; import 'package:ppl_disabilitas/network/data/network_model.dart';
import 'package:ppl_disabilitas/page/filter_fasilitas/insideFilter.dart';
import 'package:ppl_disabilitas/page/filter_fasilitas/komentar.dart'; import 'package:ppl_disabilitas/page/filter_fasilitas/komentar.dart';
class Fasilitas extends StatefulWidget { class Fasilitas extends StatefulWidget {
...@@ -19,6 +18,17 @@ class Fasilitas extends StatefulWidget { ...@@ -19,6 +18,17 @@ class Fasilitas extends StatefulWidget {
} }
class _FasilitasState extends State<Fasilitas> { class _FasilitasState extends State<Fasilitas> {
var kursiRodaVal = false;
var liftVal = false;
var toiletDisabilitasVal = false;
var tempatIbadahVal = false;
var bidangMiringVal = false;
var parkirUmumVal = false;
var parkirDisabilitasVal = false;
var komentarTerbaru = false;
var komentarRatingTertinggi = false;
var komentarTerpopuler = false;
var showUrutan = true;
final KomentarBloc _bloc = KomentarBloc(); final KomentarBloc _bloc = KomentarBloc();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -96,6 +106,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -96,6 +106,7 @@ class _FasilitasState extends State<Fasilitas> {
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: FlatButton( child: FlatButton(
key: Key('Tambah Informasi'),
color: Colors.green[700], color: Colors.green[700],
textColor: Colors.white, textColor: Colors.white,
disabledColor: Colors.grey, disabledColor: Colors.grey,
...@@ -132,6 +143,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -132,6 +143,7 @@ class _FasilitasState extends State<Fasilitas> {
Container( Container(
decoration: BoxDecoration(boxShadow: regularShadow), decoration: BoxDecoration(boxShadow: regularShadow),
child: FlatButton( child: FlatButton(
key: Key('FilterButton'),
color: Colors.green[700], color: Colors.green[700],
textColor: Colors.white, textColor: Colors.white,
disabledColor: Colors.grey, disabledColor: Colors.grey,
...@@ -216,4 +228,527 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -216,4 +228,527 @@ class _FasilitasState extends State<Fasilitas> {
), ),
); );
} }
InsideFilter() {
return StatefulBuilder(
builder: (context, setStateModal) => Container(
height: MediaQuery.of(context).size.height / 2,
decoration: BoxDecoration(
boxShadow: regularShadow,
borderRadius: BorderRadius.all(
Radius.circular(10) // <--- border radius here
),
color: Colors.white,
),
child: Container(
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(regularBiggerSpace),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
children: <Widget>[
Icon(Icons.filter_list),
Container(
margin: EdgeInsets.only(left: regularSpace),
child: Text(
'Filter Pencarian',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w800,
fontSize: 20.0),
),
),
],
),
Row(
children: <Widget>[
Text(
'BATAL',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w800,
fontSize: 17),
),
],
),
],
),
),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: greenPrimary, width: 1.5))),
),
Expanded(
child: Container(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
),
child: ListView(
children: <Widget>[
InkWell(
child: Container(
decoration: BoxDecoration(
color: greenPale,
),
padding: EdgeInsets.only(
left: regularSpace,
right: regularSpace,
top: doubleSpace,
bottom: doubleSpace),
child: Text(
'Urutan',
style: TextStyle(
fontSize: 18,
color: Colors.white,
fontFamily: 'Muli',
),
),
),
splashColor: Colors.green[400],
highlightColor: Colors.green[400],
onTap: () => setStateModal(() {
print('no');
showUrutan = true;
})),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: greenPrimary, width: 1.5),
)),
),
InkWell(
child: Container(
decoration: BoxDecoration(
color: greenPale,
),
padding: EdgeInsets.only(
left: regularSpace,
right: regularSpace,
top: doubleSpace,
bottom: doubleSpace),
child: Text(
'Jenis Fasilitas',
style: TextStyle(
fontSize: 18,
color: Colors.white,
fontFamily: 'Muli',
),
),
),
splashColor: Colors.green[400],
highlightColor: Colors.green[400],
onTap: () => setStateModal(() {
print("yes");
showUrutan = false;
})),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: greenPrimary, width: 1.5))),
),
],
),
),
),
Expanded(
flex: 3,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border(
left: BorderSide(color: greenPrimary, width: 1.5),
),
),
child: Stack(
children: <Widget>[
Opacity(
opacity: showUrutan ? 0 : 1,
child: ListView(
children: <Widget>[
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: komentarTerbaru,
onChanged: (bool value) {
setStateModal(() {
komentarTerbaru = value;
});
},
),
),
Text(
"Komentar Terbaru",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: komentarTerpopuler,
onChanged: (bool value) {
setStateModal(() {
komentarTerpopuler = value;
});
},
),
),
Text(
"Komentar Terpopuler",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Container(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor:
greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: komentarTerpopuler,
onChanged: (bool value) {
setStateModal(() {
komentarTerpopuler = value;
});
},
),
),
Flexible(
child: Text(
"Komentar dengan Rating Tertinggi",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
),
],
),
),
],
),
),
Opacity(
opacity: showUrutan ? 1 : 0,
child: ListView(
children: <Widget>[
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: kursiRodaVal,
onChanged: (bool value) {
setStateModal(() {
kursiRodaVal = value;
});
},
),
),
Text(
"Kursi roda",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: liftVal,
onChanged: (bool value) {
setStateModal(() {
liftVal = value;
});
},
),
),
Text(
"Lift",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: toiletDisabilitasVal,
onChanged: (bool value) {
setStateModal(() {
toiletDisabilitasVal = value;
});
},
),
),
Text(
"Toilet Disabilitas",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: tempatIbadahVal,
onChanged: (bool value) {
setStateModal(() {
tempatIbadahVal = value;
});
},
),
),
Text(
"Tempat Ibadah",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: bidangMiringVal,
onChanged: (bool value) {
setStateModal(() {
bidangMiringVal = value;
});
},
),
),
Text(
"Bidang Miring (Ramp)",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: parkirUmumVal,
onChanged: (bool value) {
setStateModal(() {
parkirUmumVal = value;
});
},
),
),
Text(
"Parkir Umum",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: Colors.red,
activeColor: Colors.amberAccent,
value: parkirDisabilitasVal,
onChanged: (bool value) {
setStateModal(() {
parkirDisabilitasVal = value;
});
},
),
),
Text(
"Parkir Disabilitas",
style: TextStyle(
color: Colors.black,
fontSize: 18),
),
//Container(height: 1.0,),
],
),
],
),
),
],
),
),
),
],
),
),
),
Column(
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: greenPrimary, width: 1.5),
)),
),
Container(
margin:
EdgeInsets.only(left: doubleSpace, right: doubleSpace),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: regularSpace, bottom: regularSpace),
decoration: BoxDecoration(boxShadow: regularShadow),
child: SizedBox(
child: FlatButton(
color: redPrimary,
textColor: Colors.white,
padding: EdgeInsets.only(
top: regularBiggerSpace,
bottom: regularBiggerSpace,
left: doubleSpace,
right: doubleSpace),
shape: RoundedRectangleBorder(
borderRadius: regularBorderRadius,
side: BorderSide(color: Colors.transparent)),
splashColor: greenPrimary,
onPressed: () {
/*...*/
},
child: Text(
"Hapus Semua",
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.w400),
),
),
),
),
Container(
margin: EdgeInsets.only(
top: regularSpace, bottom: regularSpace),
decoration: BoxDecoration(boxShadow: regularShadow),
child: SizedBox(
child: FlatButton(
color: greenPrimary,
textColor: Colors.white,
padding: EdgeInsets.only(
top: regularBiggerSpace,
bottom: regularBiggerSpace,
left: spaceFourty,