Fakultas Ilmu Komputer UI

Commit 451dc4a4 authored by Fakhira Devina's avatar Fakhira Devina
Browse files

[REFACTOR] handle error images, add more filter

parent 6b2cf39d
Pipeline #41848 failed with stages
in 16 minutes and 52 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-20 09:52:19.249072","version":"1.15.17"}
\ No newline at end of file
{"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-20 13:02:53.708054","version":"1.15.17"}
\ No newline at end of file
......@@ -16,10 +16,7 @@ class ImageHolder extends StatelessWidget {
placeholder: (context, _) =>
const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/margocity.png'),
fit: BoxFit.scaleDown)),
child: Center(child: Text('Failed to load images'),),
),
);
}
......
......@@ -27,6 +27,12 @@ class _FasilitasState extends State<Fasilitas> {
var bidangMiringVal = true;
var parkirUmumVal = true;
var parkirDisabilitasVal = true;
var guidingBlockVal = true;
var temanDisabilitasVal = true;
var juruIsyaratVal = true;
var tongkatVal = true;
var kursiDisabilitasVal = true;
var runningTextVal = true;
var komentarTerbaru = false;
var komentarRatingTertinggi = false;
var komentarTerpopuler = false;
......@@ -581,6 +587,34 @@ class _FasilitasState extends State<Fasilitas> {
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: greenPrimary,
activeColor: greenPale,
value: guidingBlockVal,
onChanged: (bool value) {
_bloc.filterKomentarList('GB',
value, allKomentarFromApi);
setStateModal(() {
guidingBlockVal = value;
});
},
),
),
Text(
"Guiding Block",
style: TextStyle(
color: Colors.black, fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
......@@ -609,6 +643,117 @@ class _FasilitasState extends State<Fasilitas> {
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: greenPrimary,
activeColor: greenPale,
value: temanDisabilitasVal,
onChanged: (bool value) {
_bloc.filterKomentarList('CP',
value, allKomentarFromApi);
setStateModal(() {
temanDisabilitasVal = value;
});
},
),
),
Text(
"Teman 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: greenPrimary,
activeColor: greenPale,
value: juruIsyaratVal,
onChanged: (bool value) {
_bloc.filterKomentarList('JI',
value, allKomentarFromApi);
setStateModal(() {
juruIsyaratVal = value;
});
},
),
),
Text(
"Juru Bahasa Isyarat",
style: TextStyle(
color: Colors.black, fontSize: 18),
),
],
),Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: greenPrimary,
activeColor: greenPale,
value: tongkatVal,
onChanged: (bool value) {
_bloc.filterKomentarList('TN',
value, allKomentarFromApi);
setStateModal(() {
tongkatVal = value;
});
},
),
),
Text(
"Tongkat Disabilitas Netra",
style: TextStyle(
color: Colors.black, fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: greenPrimary,
activeColor: greenPale,
value: kursiDisabilitasVal,
onChanged: (bool value) {
_bloc.filterKomentarList('KD',
value, allKomentarFromApi);
setStateModal(() {
kursiDisabilitasVal = value;
});
},
),
),
Text(
"Kursi Umum Disabilitas",
style: TextStyle(
color: Colors.black, fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
......@@ -637,6 +782,34 @@ class _FasilitasState extends State<Fasilitas> {
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: greenPrimary,
),
child: Checkbox(
checkColor: greenPrimary,
activeColor: greenPale,
value: runningTextVal,
onChanged: (bool value) {
_bloc.filterKomentarList('RT',
value, allKomentarFromApi);
setStateModal(() {
runningTextVal = value;
});
},
),
),
Text(
"Tempat Ibadah",
style: TextStyle(
color: Colors.black, fontSize: 18),
),
],
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
......@@ -689,77 +862,55 @@ class _FasilitasState extends State<Fasilitas> {
margin:
EdgeInsets.only(left: doubleSpace, right: doubleSpace),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
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: () {
setStateModal(() {
kursiRodaVal = false;
liftVal = false;
toiletDisabilitasVal = false;
tempatIbadahVal = false;
bidangMiringVal = false;
parkirUmumVal = false;
parkirDisabilitasVal = false;
komentarTerbaru = false;
komentarRatingTertinggi = false;
komentarTerpopuler = false;
showUrutan = true;
});
_bloc.resetKomentarList();
},
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,
right: spaceFourty),
shape: RoundedRectangleBorder(
borderRadius: regularBorderRadius,
side: BorderSide(color: Colors.transparent)),
splashColor: greenPrimary,
onPressed: () {
/*...*/
},
child: Text(
"Terapkan",
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.w400),
),
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: () {
setStateModal(() {
kursiRodaVal = true;
liftVal = true;
toiletDisabilitasVal = true;
tempatIbadahVal = true;
bidangMiringVal = true;
parkirUmumVal = true;
parkirDisabilitasVal = true;
guidingBlockVal = true;
temanDisabilitasVal = true;
juruIsyaratVal = true;
tongkatVal = true;
kursiDisabilitasVal = true;
runningTextVal = true;
komentarTerbaru = false;
komentarRatingTertinggi = false;
komentarTerpopuler = false;
showUrutan = true;
});
_bloc.resetKomentarList();
},
child: Text(
"Hapus Semua",
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.w400),
),
),
),
],
),
),
......@@ -773,13 +924,19 @@ class _FasilitasState extends State<Fasilitas> {
@override
void dispose() {
kursiRodaVal = false;
liftVal = false;
toiletDisabilitasVal = false;
tempatIbadahVal = false;
bidangMiringVal = false;
parkirUmumVal = false;
parkirDisabilitasVal = false;
kursiRodaVal = true;
liftVal = true;
toiletDisabilitasVal = true;
tempatIbadahVal = true;
bidangMiringVal = true;
parkirUmumVal = true;
parkirDisabilitasVal = true;
guidingBlockVal = true;
temanDisabilitasVal = true;
juruIsyaratVal = true;
tongkatVal = true;
kursiDisabilitasVal = true;
runningTextVal = true;
komentarTerbaru = false;
komentarRatingTertinggi = false;
komentarTerpopuler = false;
......
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/component/ImageHolder.dart';
import 'package:ppl_disabilitas/config/strings.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/model/komentar.dart';
......@@ -84,10 +85,7 @@ class _KomentarState extends State<Komentar> {
),
Container(
margin: EdgeInsets.only(bottom: regularSpace),
child: ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Image.asset('assets/images/disabletoilet.jpg'),
)),
child: ImageHolder(url: widget.komentar.image)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
......
......@@ -3,7 +3,6 @@ import 'package:ppl_disabilitas/component/bisago_appbar.dart';
import 'package:ppl_disabilitas/component/bisago_drawer.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/page/informasi/list_sekolah.dart';
import 'package:ppl_disabilitas/page/informasi/detailSekolah.dart';
class LayananDisabilitas extends StatefulWidget {
@override
......@@ -55,7 +54,7 @@ class _LayananDisabilitasState extends State<LayananDisabilitas> {
width: 2, color: greenPrimary.withOpacity(0.4))),
//splashColor: Colors.lightGreen,
onPressed: () {
_navigateToDetailSekolahPage(context);
//_navigateToDetailSekolahPage(context);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
......@@ -122,17 +121,4 @@ class _LayananDisabilitasState extends State<LayananDisabilitas> {
final route = MaterialPageRoute(builder: (_) => ListSekolah());
Navigator.of(context).push(route);
}
void _navigateToDetailSekolahPage(BuildContext context) {
final route = MaterialPageRoute(builder: (_) => DetailSekolah(
"Sekolah Pilar Indonesia",
"Jl. Paso No.84, Jagakarsa, Kec. Jagakarsa, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12620",
"02149305494",
"www.pilarindonesia.com",
"1000",
"Swasta",
"Inklusi",
"A"));
Navigator.of(context).push(route);
}
}
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/bloc/LokasiResponseBloc.dart';
import 'package:ppl_disabilitas/component/ImageHolder.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/model/lokasi.dart';
import 'package:ppl_disabilitas/network/data/network_model.dart';
......@@ -212,7 +213,7 @@ class PencarianState extends State<Pencarian> {
alamat: places[index].alamat,
nama: places[index].name,
telpon: places[index].no_telp,
url: 'http://dummyimage.com/128x141.png/ff4444/ffffff',
url: places[index].image,
id: places[index].id,
)));
},
......@@ -231,7 +232,7 @@ class PencarianState extends State<Pencarian> {
children: <Widget>[
CircleAvatar(
backgroundColor: greenPrimary,
child: Text('Test'),
child: ImageHolder(url: places[index].image,),
),
Expanded(
child: Container(
......
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