Fakultas Ilmu Komputer UI

Commit 4624245b authored by Fakhira Devina's avatar Fakhira Devina
Browse files

Add comment place holder

parent 887532e1
<<<<<<< HEAD {"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"location","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}]}
{"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 12:56:31.966938","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":"shared_preferences","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.6+3\\\\","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":"shared_preferences","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences-0.5.6+3\\\\","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":"shared_preferences_macos","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-0.0.1+6\\\\","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":[{"name":"shared_preferences_web","path":"D:\\\\Flutter\\\\flutter_windows_v1.9.1+hotfix.2-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-0.1.2+4\\\\","dependencies":[]}]},"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":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-04-21 10:40:51.758556","version":"1.15.17"}
>>>>>>> staging
...@@ -26,6 +26,7 @@ class KomentarBloc { ...@@ -26,6 +26,7 @@ class KomentarBloc {
KomentarList komentarListResponse = KomentarList komentarListResponse =
await _komentarRepository.fetchKomentar(namaLokasi); await _komentarRepository.fetchKomentar(namaLokasi);
allKomentarFromApi = List.from(komentarListResponse.allKomentar); allKomentarFromApi = List.from(komentarListResponse.allKomentar);
komentarListSink.add(NetworkModel.completed(komentarListResponse)); komentarListSink.add(NetworkModel.completed(komentarListResponse));
} catch (e) { } catch (e) {
komentarListSink.add(NetworkModel.error(e.toString())); komentarListSink.add(NetworkModel.error(e.toString()));
......
import 'package:dio/dio.dart';
import 'package:mockito/mockito.dart';
class MockHttpClient extends Mock implements Dio {}
var dio;
getDioInstance(String env) {
dio = env == 'build' ? Dio() : MockHttpClient();
}
mockLokasiDependencies() {
when(dio.get(
any,
)).thenAnswer((_) async {
final expected = Future<Response<List<Map<String, dynamic>>>>.value(
Response<List<Map<String, dynamic>>>(statusCode: 200, data: [
{
"id": 1,
"name": "Soppeng",
"latitude": 100039203300.0,
"longitude": 100000000000.0,
"alamat": "Jalan Margonda Raya",
"no_telp": "081111111111",
"image": "test.jpg"
}
]));
return expected;
});
}
mockFasilitasDependencies(Map<String, dynamic> mockFasilitas) {
when(dio.get(
any,
)).thenAnswer((_) async {
final expected = Future<Response<Map<String, dynamic>>>.value(
Response<Map<String, dynamic>>(statusCode: 200, data: mockFasilitas));
return expected;
});
}
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/app.dart'; import 'package:ppl_disabilitas/app.dart';
import 'flavor/flavor.dart'; import 'flavor/flavor.dart';
import 'globalnetwork.dart';
void main() { void main() {
getDioInstance('build');
dio.options.receiveTimeout = 15000;
ApiFlavor.flavor = BuildFlavor.production.toString(); ApiFlavor.flavor = BuildFlavor.production.toString();
runApp(BisaGo()); runApp(BisaGo());
......
import 'dart:convert'; import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:ppl_disabilitas/globalnetwork.dart';
import 'package:ppl_disabilitas/network/CustomException.dart'; import 'package:ppl_disabilitas/network/CustomException.dart';
import 'package:http/http.dart' as http;
import 'dart:io'; import 'dart:io';
class NetworkInterface { class NetworkInterface {
//String key = KEY;
// POST request
Future<dynamic> post( { Future<dynamic> post( {
String url, //url nya apa String url, //url nya apa
dynamic bodyParams, //data apa yang mau dikasih dynamic bodyParams, //data apa yang mau dikasih
bool isLogin, //dia login apa ngga bool isLogin, //dia login apa ngga
}) async { }) async {
var responseJson; var responseJson;
final headersJson =
await _buildRequestHeader(isLogin); //butuh header apa ngga
try { try {
final response = await http.post( final response = await dio.post(
"$url", "$url",
body: json.encode(bodyParams), data: json.encode(bodyParams),
headers: headersJson, //headers: headersJson,
); );
responseJson = _response(response); responseJson = _response(response);
} on SocketException { } on SocketException {
...@@ -34,11 +30,9 @@ class NetworkInterface { ...@@ -34,11 +30,9 @@ class NetworkInterface {
bool isLogin, bool isLogin,
}) async { }) async {
var responseJson; var responseJson;
final headersJson = await _buildRequestHeader(isLogin);
try { try {
final response = await http.get( final response = await dio.get(
"$url", "$url",
headers: headersJson,
); );
responseJson = _response(response); responseJson = _response(response);
} on SocketException { } on SocketException {
...@@ -47,46 +41,19 @@ class NetworkInterface { ...@@ -47,46 +41,19 @@ class NetworkInterface {
return responseJson; return responseJson;
} }
// buildRequestHeader: untuk nentuin pake header apa aja berdasarkan login apa ngga
Future<Map<String, dynamic>> _buildRequestHeader(bool isLogin) async {
Map<String, String> headers = Map<String, String>();
headers.putIfAbsent("Content-Type", () => "application/json");
//if (isLogin) {
//List<dynamic> cookieFile = await CookiesInterface().getCookieFile(
// fileName:
// "userCookies"); //ngambil data dari yg udh disimpen di cookie
//print("cookieFile list --> ${cookieFile.toString()}");
//print("check key here >>> $key");
//setKey(cookieFile[2]);
//key = cookieFile[2];
//headers.putIfAbsent(
// "Authorization",
// () =>
// 'Token $key'); //ini kalau authorization nya ngga ada baru taro token nya
//headers.putIfAbsent("X-CSRFToken", () => cookieFile[0]); //csrf token
//headers.putIfAbsent(
// "Cookie",
// () =>
// "csrftoken=${cookieFile[0]};sessionid=${cookieFile[1]}"); //cookie file
//print("headers --> ${headers}");
//}
return headers;
}
dynamic _response(http.Response response) { dynamic _response(Response response) {
switch (response.statusCode) { switch (response.statusCode) {
case 200: case 200:
final responseJson = json.decode(response.body.toString()); return response.data;
return responseJson;
case 201: case 201:
var responseJson = json.decode(response.body.toString()); return response.data;
return responseJson;
case 400: case 400:
throw BadRequestException(response.body.toString()); throw BadRequestException(response.data.toString());
case 401: case 401:
case 403: case 403:
throw UnauthorisedException(response.body.toString()); throw UnauthorisedException(response.data.toString());
case 500: case 500:
default: default:
......
...@@ -47,7 +47,6 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -47,7 +47,6 @@ class _FasilitasState extends State<Fasilitas> {
void initState() { void initState() {
allKomentarFromApi = []; allKomentarFromApi = [];
_bloc = KomentarBloc(widget.nama); _bloc = KomentarBloc(widget.nama);
komentarStream = _bloc.komentarListStream;
super.initState(); super.initState();
} }
...@@ -83,6 +82,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -83,6 +82,7 @@ class _FasilitasState extends State<Fasilitas> {
children: <Widget>[ children: <Widget>[
Icon(Icons.place, color: Colors.black, size: 20), Icon(Icons.place, color: Colors.black, size: 20),
Flexible( Flexible(
key: Key('Alamat'),
child: Text( child: Text(
widget.alamat, widget.alamat,
softWrap: true, softWrap: true,
...@@ -194,7 +194,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -194,7 +194,7 @@ class _FasilitasState extends State<Fasilitas> {
), ),
), ),
StreamBuilder( StreamBuilder(
stream: komentarStream, stream: _bloc.komentarListStream,
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasData) { if (snapshot.hasData) {
switch (snapshot.data.status) { switch (snapshot.data.status) {
...@@ -297,6 +297,8 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -297,6 +297,8 @@ class _FasilitasState extends State<Fasilitas> {
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
key: Key('Urutan'),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: greenPale, color: greenPale,
...@@ -327,6 +329,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -327,6 +329,7 @@ class _FasilitasState extends State<Fasilitas> {
)), )),
), ),
InkWell( InkWell(
key: Key('Jenis Fasilitas'),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: greenPale, color: greenPale,
...@@ -376,6 +379,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -376,6 +379,7 @@ class _FasilitasState extends State<Fasilitas> {
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
Row( Row(
key: Key('Komentar Terbaru'),
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Theme( Theme(
...@@ -404,6 +408,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -404,6 +408,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Komentar Terpopuler'),
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Theme( Theme(
...@@ -432,6 +437,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -432,6 +437,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Container( Container(
key: Key('Komentar dengan Rating Tertinggi'),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
...@@ -475,6 +481,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -475,6 +481,7 @@ class _FasilitasState extends State<Fasilitas> {
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
Row( Row(
key: Key('Kursi Roda'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -503,6 +510,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -503,6 +510,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Lift'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -531,6 +539,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -531,6 +539,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Toilet Disabilitas'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -559,6 +568,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -559,6 +568,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Tempat Ibadah'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -587,6 +597,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -587,6 +597,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Guiding Block'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -615,6 +626,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -615,6 +626,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Bidang Miring (Ramp)'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -643,6 +655,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -643,6 +655,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Teman Disabilitas'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -671,6 +684,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -671,6 +684,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Juru Bahasa Isyarat'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -698,6 +712,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -698,6 +712,7 @@ class _FasilitasState extends State<Fasilitas> {
), ),
], ],
),Row( ),Row(
key: Key("Tongkat Disabilitas Netra"),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -726,6 +741,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -726,6 +741,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key("Kursi Umum Disabilitas"),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -754,6 +770,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -754,6 +770,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key("Parkir Umum"),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -782,6 +799,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -782,6 +799,7 @@ class _FasilitasState extends State<Fasilitas> {
], ],
), ),
Row( Row(
key: Key('Running Text'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -803,13 +821,14 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -803,13 +821,14 @@ class _FasilitasState extends State<Fasilitas> {
), ),
), ),
Text( Text(
"Tempat Ibadah", "Running Text",
style: TextStyle( style: TextStyle(
color: Colors.black, fontSize: 18), color: Colors.black, fontSize: 18),
), ),
], ],
), ),
Row( Row(
key: Key('Parkir Disabilitas'),
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -946,7 +965,7 @@ class _FasilitasState extends State<Fasilitas> { ...@@ -946,7 +965,7 @@ class _FasilitasState extends State<Fasilitas> {
await Navigator.of(context).push(MaterialPageRoute( await Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => AddInformasi( builder: (BuildContext context) => AddInformasi(
nama: widget.nama, nama: widget.nama,
))); ))).then((value) => _bloc.fetchKomentarList(widget.nama));
} }
} }
......
...@@ -39,7 +39,7 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -39,7 +39,7 @@ class _DetailPostPageState extends State<DetailPostPage> {
Container( Container(
key: Key('desc'), key: Key('desc'),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: regularShadow, boxShadow: regularShadow,
border: Border.all(color: greenPale), border: Border.all(color: greenPale),
borderRadius: regularBorderRadius), borderRadius: regularBorderRadius),
...@@ -68,7 +68,7 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -68,7 +68,7 @@ class _DetailPostPageState extends State<DetailPostPage> {
), ),
), ),
Text( Text(
'${widget.komentar.creator}', '${widget.komentar.creator}', style: TextStyle(fontSize: 18),
key: Key('creator-${widget.komentar.creator}'), key: Key('creator-${widget.komentar.creator}'),
), ),
Text( Text(
...@@ -88,7 +88,8 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -88,7 +88,8 @@ class _DetailPostPageState extends State<DetailPostPage> {
borderRadius: regularBorderRadius, borderRadius: regularBorderRadius,
boxShadow: regularShadow), boxShadow: regularShadow),
padding: EdgeInsets.all(smallSpace), padding: EdgeInsets.all(smallSpace),
margin: EdgeInsets.symmetric(horizontal: smallSpace), margin:
EdgeInsets.symmetric(horizontal: smallSpace),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -141,7 +142,7 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -141,7 +142,7 @@ class _DetailPostPageState extends State<DetailPostPage> {
Container( Container(
key: Key('rating'), key: Key('rating'),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: regularShadow, boxShadow: regularShadow,
border: Border.all(color: greenPale), border: Border.all(color: greenPale),
borderRadius: regularBorderRadius), borderRadius: regularBorderRadius),
...@@ -167,7 +168,16 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -167,7 +168,16 @@ class _DetailPostPageState extends State<DetailPostPage> {
) )
], ],
), ),
) ),
Container(
key: Key('Komentar'),
padding: EdgeInsets.symmetric(vertical: regularSpace),
child: Text(
'Komentar',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w800),
)),
komentarPlaceHolder(
'test', widget.komentar.date_time, 'hard coded komentar')
], ],
), ),
), ),
...@@ -181,7 +191,7 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -181,7 +191,7 @@ class _DetailPostPageState extends State<DetailPostPage> {
padding: EdgeInsets.all(smallSpace), padding: EdgeInsets.all(smallSpace),
margin: EdgeInsets.all(smallSpace), margin: EdgeInsets.all(smallSpace),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: regularBorderRadius, borderRadius: regularBorderRadius,
border: Border.all(color: greenPale), border: Border.all(color: greenPale),
boxShadow: regularShadow), boxShadow: regularShadow),
...@@ -192,4 +202,39 @@ class _DetailPostPageState extends State<DetailPostPage> { ...@@ -192,4 +202,39 @@ class _DetailPostPageState extends State<DetailPostPage> {
), ),
); );
} }
komentarPlaceHolder(String nama, DateTime date, String description) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
CircleAvatar(