Fakultas Ilmu Komputer UI

Commit 0bef9d22 authored by Fakhira Devina's avatar Fakhira Devina
Browse files

Merge remote-tracking branch 'origin/PBI-5-daftar_layanan_fasilitas_publik'...

Merge remote-tracking branch 'origin/PBI-5-daftar_layanan_fasilitas_publik' into PBI-5-daftar_layanan_fasilitas_publik
parents 3a761c58 81d88edf
{"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:32:49.994188","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-16 14:34:00.434107","version":"1.15.17"}
\ No newline at end of file
......@@ -13,17 +13,17 @@ class KomentarBloc {
Stream<NetworkModel<KomentarList>> get komentarListStream =>
_komentarListController.stream;
KomentarBloc() {
KomentarBloc(String namaLokasi) {
_komentarListController = StreamController<NetworkModel<KomentarList>>();
_komentarRepository = KomentarRepository();
fetchKomentarList();
fetchKomentarList(namaLokasi);
}
fetchKomentarList() async {
fetchKomentarList(String namaLokasi) async {
komentarListSink.add(NetworkModel.loading('Getting Komentar'));
try {
KomentarList komentarListResponse =
await _komentarRepository.fetchKomentar();
await _komentarRepository.fetchKomentar(namaLokasi);
komentarListSink.add(NetworkModel.completed(komentarListResponse));
} catch (e) {
komentarListSink.add(NetworkModel.error(e.toString()));
......
......@@ -31,7 +31,7 @@ class LokasiResponseBloc {
fetchLokasiList() async {
lokasiListSink.add(NetworkModel.loading('Getting Locations'));
try {
LokasiListResponse lokasiListResponse =
final lokasiListResponse =
await _lokasiRepository.fetchLokasi();
lokasiListSink.add(NetworkModel.completed(lokasiListResponse));
} catch (e) {
......@@ -42,7 +42,7 @@ class LokasiResponseBloc {
fetchRecentSearch() async {
recentSearchSink.add(NetworkModel.loading('Getting Recent Search'));
try {
LokasiListResponse recentSearchData = await _lokasiRepository.fetchRecentSearch();
final recentSearchData = await _lokasiRepository.fetchRecentSearch();
recentSearchSink.add(NetworkModel.completed(recentSearchData));
} catch (e) {
recentSearchSink.add(NetworkModel.error(e.toString()));
......
......@@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/config/styles.dart';
class BisaGoAppBar extends StatelessWidget implements PreferredSizeWidget {
final String title;
BisaGoAppBar({this.title = 'bisaGo', Key key}) : super(key: key);
@override
final Size preferredSize = Size.fromHeight(55);
final Size preferredSize = const Size.fromHeight(55);
@override
Widget build(BuildContext context) {
return AppBar(
......@@ -16,7 +18,7 @@ class BisaGoAppBar extends StatelessWidget implements PreferredSizeWidget {
children: <Widget>[
Padding(padding: EdgeInsets.all(doubleSpace),
child: Text(
"bisaGo",
title,
style: TextStyle(
fontSize: 25,
fontFamily: 'Comfortaa',
......
......@@ -11,11 +11,11 @@ class BisaGoDrawer extends StatelessWidget {
@override
Widget build(BuildContext context) {
List<Widget> menus = drawerList.map((menu) {
final menus = drawerList.map((menu) {
return _createListTile(
context: context, icon: menu['icon'], title: menu['title']);
}).toList();
List<Widget> drawerItem = [
final drawerItem = [
Container(
height: 130,
child: DrawerHeader(
......
// Frequently used strings are stored here
// No hardcoding string view files. Store here.
final String devBaseURL = "poipole.herokuapp.com";
final String baseURL = "poipole.herokuapp.com";
const String devBaseURL = "poipole.herokuapp.com";
const String baseURL = "poipole.herokuapp.com";
String key = "";
String csrf = "";
String sessionId = "";
......@@ -13,4 +13,24 @@ setKey(String newKey) {
setSessionId(String newSessionId) {
sessionId = newSessionId;
}
final tags = {
'KR': 'kursiroda',
'LF': 'liftdisabilitas',
'TD': 'toiletdisabilitas',
'MM': 'masjid',
'GB': 'guidingblock',
'BM': 'bidangmiring',
'CP': 'temandisabilitas',
'JI': 'jurubahasaisyarat',
'TN': 'tongkatdisabilitasnetra',
'KD': 'kursiumumdisabilitas',
'PK': 'tempatparkirdisabilitas',
'RT': 'runningtext',
'TB': 'tempatparkirbiasa'
};
getTag(String tag) {
return tags[tag];
}
\ No newline at end of file
import 'package:flutter/material.dart';
final Color greenPrimary = Color(0xff3A903A);
final Color greenPale = Color(0xff4FBA4F);
final Color redPrimary = Color(0xffC60000);
const Color greenPrimary = Color(0xff3A903A);
const Color greenPale = Color(0xff4FBA4F);
const Color redPrimary = Color(0xffC60000);
const Color grayPrimary = Color(0xff645C5C);
final double superSmallSpace = 4.0;
final double smallSpace = 4.0;
final double regularSpace = 8.0;
final double regularBiggerSpace = 12.0;
final double doubleSpace = 16.0;
final double tripleSpace = 32.0;
final double spaceFourty = 45.0;
final double quartetSpace = 64.0;
final double spaceFourtyEight = 48.0;
const double superSmallSpace = 4.0;
const double smallSpace = 4.0;
const double regularSpace = 8.0;
const double regularBiggerSpace = 12.0;
const double doubleSpace = 16.0;
const double tripleSpace = 32.0;
const double spaceFourty = 45.0;
const double quartetSpace = 64.0;
const double spaceFourtyEight = 48.0;
final List<BoxShadow> regularShadow = [
BoxShadow(
......
......@@ -10,13 +10,20 @@ class KomentarList {
@JsonSerializable()
class KomentarModel {
final String nama_orang;
final int suka;
final int tidak_suka;
final String foto;
final String nama_lokasi;
final String deskripsi;
final String creator;
final DateTime date_time;
final int like;
final int dislike;
final int rating;
final List<String> tag;
final String image;
final bool is_verified;
KomentarModel(
{this.nama_orang, this.suka, this.tidak_suka, this.foto});
{this.nama_lokasi, this.deskripsi, this.creator, this.date_time,
this.like, this.dislike, this.rating, this.tag, this.image, this.is_verified});
factory KomentarModel.fromJson(Map<String, dynamic> json) => _$KomentarModelFromJson(json);
......
......@@ -23,17 +23,31 @@ Map<String, dynamic> _$KomentarListToJson(KomentarList instance) =>
KomentarModel _$KomentarModelFromJson(Map<String, dynamic> json) {
return KomentarModel(
nama_orang: json['nama_orang'] as String,
suka: json['suka'] as int,
tidak_suka: json['tidak_suka'] as int,
foto: json['foto'] as String,
nama_lokasi: json['nama_lokasi'] as String,
deskripsi: json['deskripsi'] as String,
creator: json['creator'] as String,
date_time: json['date_time'] == null
? null
: DateTime.parse(json['date_time'] as String),
like: json['like'] as int,
dislike: json['dislike'] as int,
rating: json['rating'] as int,
tag: (json['tag'] as List)?.map((e) => e as String)?.toList(),
image: json['image'] as String,
is_verified: json['is_verified'] as bool,
);
}
Map<String, dynamic> _$KomentarModelToJson(KomentarModel instance) =>
<String, dynamic>{
'nama_orang': instance.nama_orang,
'suka': instance.suka,
'tidak_suka': instance.tidak_suka,
'foto': instance.foto,
'nama_lokasi': instance.nama_lokasi,
'deskripsi': instance.deskripsi,
'creator': instance.creator,
'date_time': instance.date_time?.toIso8601String(),
'like': instance.like,
'dislike': instance.dislike,
'rating': instance.rating,
'tag': instance.tag,
'image': instance.image,
'is_verified': instance.is_verified,
};
......@@ -9,12 +9,13 @@ class LokasiListResponse {
@JsonSerializable(nullable: true)
class Lokasi {
String nama;
int id;
String name;
double latitude;
double longitude;
String alamat;
String foto;
String telepon;
String image;
String no_telp;
Lokasi();
......
......@@ -22,19 +22,21 @@ Map<String, dynamic> _$LokasiListResponseToJson(LokasiListResponse instance) =>
Lokasi _$LokasiFromJson(Map<String, dynamic> json) {
return Lokasi()
..nama = json['nama'] as String
..id = json['id'] as int
..name = json['name'] as String
..latitude = (json['latitude'] as num)?.toDouble()
..longitude = (json['longitude'] as num)?.toDouble()
..alamat = json['alamat'] as String
..foto = json['foto'] as String
..telepon = json['telepon'] as String;
..image = json['image'] as String
..no_telp = json['no_telp'] as String;
}
Map<String, dynamic> _$LokasiToJson(Lokasi instance) => <String, dynamic>{
'nama': instance.nama,
'id': instance.id,
'name': instance.name,
'latitude': instance.latitude,
'longitude': instance.longitude,
'alamat': instance.alamat,
'foto': instance.foto,
'telepon': instance.telepon,
'image': instance.image,
'no_telp': instance.no_telp,
};
......@@ -10,8 +10,8 @@ class CookiesInterface {
await getApplicationDocumentsDirectory().then((Directory directory) {
dir = directory;
});
File cookieFile = File("${dir.path}/$fileName.json");
bool cookiesExist = cookieFile.existsSync();
final cookieFile = File("${dir.path}/$fileName.json");
final cookiesExist = cookieFile.existsSync();
return cookiesExist;
}
......@@ -29,7 +29,7 @@ class CookiesInterface {
await getApplicationDocumentsDirectory().then((Directory directory) {
dir = directory;
});
File cookieFile = File("${dir.path}/usercookies.json");
final cookieFile = File("${dir.path}/usercookies.json");
cookieFile.createSync();
setCookie = responseHeaders["set-cookie"];
......@@ -60,7 +60,7 @@ class CookiesInterface {
await getApplicationDocumentsDirectory().then((Directory directory) {
dir = directory;
});
File cookieFile = File('${dir.path}/searchhistory.json');
final cookieFile = File('${dir.path}/searchhistory.json');
cookieFile.createSync();
await checkCookieFileAvailability(fileName: "searchhistory").then((available) async {
if (available) {
......@@ -89,7 +89,7 @@ class CookiesInterface {
await getApplicationDocumentsDirectory().then((Directory directory) {
dir = directory;
});
File file = File("${dir.path}/$fileName.json");
final file = File("${dir.path}/$fileName.json");
dynamic res;
try {
res = file.readAsStringSync();
......
......@@ -7,13 +7,13 @@ class NetworkInterface {
//String key = KEY;
// POST request
Future<dynamic> post({
Future<dynamic> post( {
String url, //url nya apa
dynamic bodyParams, //data apa yang mau dikasih
bool isLogin, //dia login apa ngga
}) async {
var responseJson;
Map<String, String> headersJson =
final headersJson =
await _buildRequestHeader(isLogin); //butuh header apa ngga
try {
final response = await http.post(
......@@ -34,7 +34,7 @@ class NetworkInterface {
bool isLogin,
}) async {
var responseJson;
Map<String, dynamic> headersJson = await _buildRequestHeader(isLogin);
final headersJson = await _buildRequestHeader(isLogin);
try {
final response = await http.get(
"$url",
......@@ -76,6 +76,9 @@ class NetworkInterface {
dynamic _response(http.Response response) {
switch (response.statusCode) {
case 200:
final responseJson = json.decode(response.body.toString());
return responseJson;
case 201:
var responseJson = json.decode(response.body.toString());
return responseJson;
case 400:
......
......@@ -14,7 +14,7 @@ class Dashboard extends StatefulWidget {
class DashboardState extends State<Dashboard> {
final Completer<GoogleMapController> _controller = Completer();
final double cameraZoom = 16;
final LatLng defaultLocation = LatLng(-6.1753924, 106.8249641);
final LatLng defaultLocation = const LatLng(-6.1753924, 106.8249641);
final String currentLocationIconAsset = "assets/icon/current_loc.png";
Location location;
Set<Marker> _markers = Set<Marker>();
......@@ -25,7 +25,7 @@ class DashboardState extends State<Dashboard> {
Marker contohMarker = Marker(
markerId: MarkerId("contoh1"),
position: LatLng(-6.365474, 106.828157),
infoWindow: InfoWindow(title: "Fasilkom"),
infoWindow: const InfoWindow(title: "Fasilkom"),
icon: BitmapDescriptor.defaultMarkerWithHue(
BitmapDescriptor.hueViolet,
),
......@@ -45,7 +45,7 @@ class DashboardState extends State<Dashboard> {
_markers.add(contohMarker);
}
void enableLocationService() async {
enableLocationService() async {
await location.changeSettings(accuracy: LocationAccuracy.HIGH);
_serviceEnabled = await location.serviceEnabled();
if (!_serviceEnabled) {
......@@ -73,13 +73,13 @@ class DashboardState extends State<Dashboard> {
Widget build(BuildContext context) {
return Scaffold(
drawer: BisaGoDrawer(),
body: Stack(key: Key("Stack"),children: <Widget>[
body: Stack(key: const Key("Stack"),children: <Widget>[
_buildGoogleMap(context),
InkWell(
key: Key("Navigate to Pencarian"),
key: const Key("Navigate to Pencarian"),
onTap: () => _navigateToPencarianPage(context),
child: Container(
key: Key("Container Text Field"),
key: const Key("Container Text Field"),
margin: EdgeInsets.only(
left: doubleSpace, right: doubleSpace, top: doubleSpace),
decoration: BoxDecoration(
......@@ -88,7 +88,7 @@ class DashboardState extends State<Dashboard> {
boxShadow: regularShadow),
child: TextFormField(
enabled: false,
key: Key("Text Field Mau Kemana"),
key: const Key("Text Field Mau Kemana"),
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
......@@ -104,7 +104,7 @@ class DashboardState extends State<Dashboard> {
fontFamily: 'Muli',
fontWeight: FontWeight.w700),
suffixIcon: IconButton(
key: Key("IconButton Text Field"),
key: const Key("IconButton Text Field"),
icon: Icon(
Icons.mic,
color: greenPrimary,
......@@ -117,9 +117,9 @@ class DashboardState extends State<Dashboard> {
),
]),
appBar: PreferredSize(
preferredSize: Size.fromHeight(55),
preferredSize: const Size.fromHeight(55),
child: BisaGoAppBar(),
key: Key("Scaffold Text Field"),
key: const Key("Scaffold Text Field"),
),
);
}
......@@ -136,11 +136,11 @@ class DashboardState extends State<Dashboard> {
);
}
return Container(
key: Key("Container GoogleMap"),
key: const Key("Container GoogleMap"),
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: GoogleMap(
key: Key("Google Map"),
key: const Key("Google Map"),
markers: _markers,
mapType: MapType.normal,
initialCameraPosition: initialCameraPosition,
......@@ -151,12 +151,12 @@ class DashboardState extends State<Dashboard> {
);
}
void setSourceAndDestinationIcons() async {
setSourceAndDestinationIcons() async {
currentLocationIcon = await BitmapDescriptor.fromAssetImage(
ImageConfiguration(devicePixelRatio: 5), currentLocationIconAsset);
}
void updatePinOnMap() async {
updatePinOnMap() async {
CameraPosition cPosition = CameraPosition(
zoom: cameraZoom,
target: LatLng(currentLocation.latitude, currentLocation.longitude),
......@@ -174,7 +174,7 @@ class DashboardState extends State<Dashboard> {
});
}
void setInitialLocation() async {
setInitialLocation() async {
currentLocation = await location.getLocation();
}
}
......@@ -12,7 +12,8 @@ class Fasilitas extends StatefulWidget {
final String alamat;
final String url;
final String telpon;
Fasilitas({this.nama, this.alamat, this.url, this.telpon});
final int id;
Fasilitas({this.nama, this.alamat, this.url, this.telpon, this.id});
@override
_FasilitasState createState() => _FasilitasState();
}
......@@ -29,7 +30,16 @@ class _FasilitasState extends State<Fasilitas> {
var komentarRatingTertinggi = false;
var komentarTerpopuler = false;
var showUrutan = true;
final KomentarBloc _bloc = KomentarBloc();
KomentarBloc _bloc;
@override
void initState() {
print(widget.nama);
print(widget.id);
_bloc = KomentarBloc(widget.nama);
super.initState();
}
@override
Widget build(BuildContext context) {
print('widget.telpon ${widget.url}');
......@@ -87,7 +97,7 @@ class _FasilitasState extends State<Fasilitas> {
),
Flexible(
child: Text(
'08724981274',
widget.telpon,
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
......@@ -173,7 +183,6 @@ class _FasilitasState extends State<Fasilitas> {
],
),
),
// TODO change with komentar stream
StreamBuilder(
stream: _bloc.komentarListStream,
builder: (context, snapshot) {
......@@ -189,23 +198,12 @@ class _FasilitasState extends State<Fasilitas> {
break;
case Status.COMPLETED:
final komentar = snapshot.data.data;
return ListView.builder(
shrinkWrap: true,
itemCount: komentar.allKomentar.length,
itemBuilder: (BuildContext context, int index) {
return Komentar(
dislike:
komentar.allKomentar[index].tidak_suka,
komentar: 'Lorem ipsum',
like: komentar.allKomentar[index].suka,
tags: ['#toiletdisabilitas', '#kursiroda'],
urlImage: [
komentar.allKomentar[index].foto
],
user:
komentar.allKomentar[index].nama_orang,
);
});
return Column(
children: komentar
.allKomentar.map<Widget>((k) => Komentar(
komentar: k,
))
.toList());
break;
case Status.ERROR:
return Center(
......@@ -228,7 +226,7 @@ class _FasilitasState extends State<Fasilitas> {
),
);
}
InsideFilter() {
return StatefulBuilder(
builder: (context, setStateModal) => Container(
......@@ -237,7 +235,7 @@ class _FasilitasState extends State<Fasilitas> {
boxShadow: regularShadow,
borderRadius: BorderRadius.all(
Radius.circular(10) // <--- border radius here
),
),
color: Colors.white,
),
child: Container(
......@@ -316,15 +314,15 @@ class _FasilitasState extends State<Fasilitas> {
splashColor: Colors.green[400],
highlightColor: Colors.green[400],
onTap: () => setStateModal(() {
print('no');
showUrutan = true;
})),
print('no');
showUrutan = true;
})),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: greenPrimary, width: 1.5),
)),
top: BorderSide(
color: greenPrimary, width: 1.5),
)),
),
InkWell(
child: Container(
......@@ -348,9 +346,9 @@ class _FasilitasState extends State<Fasilitas> {
splashColor: Colors.green[400],
highlightColor: Colors.green[400],
onTap: () => setStateModal(() {
print("yes");
showUrutan = false;
})),
print("yes");
showUrutan = false;
})),
Container(
decoration: BoxDecoration(
border: Border(
......@@ -378,7 +376,7 @@ class _FasilitasState extends State<Fasilitas> {
children: <Widget>[
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
......@@ -405,7 +403,7 @@ class _FasilitasState extends State<Fasilitas> {
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(
......@@ -433,12 +431,12 @@ class _FasilitasState extends State<Fasilitas> {
Container(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: <Widget>[
Theme(
data: Theme.of(context).copyWith(