Fakultas Ilmu Komputer UI

Commit 0fc51dc1 authored by Usman Sidiq's avatar Usman Sidiq
Browse files

[REFACTOR] fix conflict

parents f6d43088 15287839
Pipeline #45445 passed with stages
in 18 minutes and 24 seconds
......@@ -36,23 +36,6 @@ class NetworkInterface {
}
// GET request
Future<dynamic> get({
String url,
bool isLogin,
}) async {
var responseJson;
try {
final response = await dio.get(
"$url",
);
responseJson = _response(response);
} on SocketException {
throw FetchDataException("No Internet Connection");
} catch (e) {
print(e.toString());
}
return responseJson;
}
Future<dynamic> put({String url}) async {
var responseJson;
......@@ -74,6 +57,23 @@ class NetworkInterface {
}
return responseJson;
}
Future<dynamic> get({
String url,
bool isLogin,
}) async {
var responseJson;
try {
final response = await dio.get(
"$url",
);
responseJson = _response(response);
} on SocketException {
throw FetchDataException("No Internet Connection");
} catch (e) {
print(e.toString());
}
return responseJson;
}
dynamic _response(Response response) {
switch (response.statusCode) {
......
......@@ -101,8 +101,7 @@ class AddKomentarState extends State<AddKomentar> {
child: ButtonTheme(
minWidth: double.infinity,
height: 40,
child: submitButton('Kirim', greenPrimary, Colors.white,
greenPrimary, Colors.white, _validateKomentarInput),
child: submitButton('Kirim', _validateKomentarInput),
))
],
)),
......
......@@ -37,7 +37,7 @@ void main() {
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(Scaffold), findsOneWidget);
expect(find.byType(ListView), findsOneWidget);
expect(find.byType(Container), findsNWidgets(7));
//expect(find.byType(Container), findsNWidgets(7));
expect(find.byType(Row), findsNWidgets(2));
expect(find.byType(Text), findsNWidgets(7));
expect(find.byType(Form), findsOneWidget);
......
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