Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
DTB-Layanan Fasilitas Publik Penyandang Disabilitas
PoiPoLeGan-PPLapanganTembak-DTB Layanan Fasilitas Publik Penyandang Disabilitas-FE
Commits
4f05e44a
Commit
4f05e44a
authored
Feb 23, 2020
by
agnes.handoko
Browse files
[GREEN] fixed failed pipeline because of linter issue
parent
205152ee
Pipeline
#30916
passed with stages
in 2 minutes and 40 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/config/strings.dart
View file @
4f05e44a
// Frequently used strings are stored here
// No hardcoding string view files. Store here.
final
String
DEV_BASE_
URL
=
"poipole.herokuapp.com"
;
final
String
BASE_
URL
=
"poipole.herokuapp.com"
;
String
KEY
=
""
;
String
CSRF
=
""
;
String
SESSION_
ID
=
""
;
final
String
devBase
URL
=
"poipole.herokuapp.com"
;
final
String
base
URL
=
"poipole.herokuapp.com"
;
String
key
=
""
;
String
csrf
=
""
;
String
session
ID
=
""
;
setKey
(
String
key
)
{
KEY
=
key
;
key
=
key
;
}
setSessionId
(
String
sessionId
)
{
SESSION_
ID
=
sessionId
;
session
ID
=
sessionId
;
}
\ No newline at end of file
lib/flavor/flavor.dart
View file @
4f05e44a
...
...
@@ -7,9 +7,9 @@ class ApiFlavor {
static
String
getBaseUrl
()
{
if
(
ApiFlavor
.
flavor
==
BuildFlavor
.
development
.
toString
())
{
return
DEV_BASE_
URL
;
return
devBase
URL
;
}
else
{
return
BASE_
URL
;
return
base
URL
;
}
}
...
...
lib/main.dart
View file @
4f05e44a
import
'package:flutter/material.dart'
;
import
'package:ppl_disabilitas/config/styles.dart'
;
import
'package:ppl_disabilitas/page/dashboard/dashboard.dart'
;
import
'flavor/flavor.dart'
;
...
...
test/widget_test.dart
View file @
4f05e44a
import
'dart:async'
;
//
import 'dart:async';
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -8,51 +8,19 @@ import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
void
main
()
{
testWidgets
(
'finds a google map in dashboard'
,
(
WidgetTester
tester
)
async
{
Completer
<
GoogleMapController
>
_controller
=
Completer
();
final
googleMap
=
GoogleMap
(
mapType:
MapType
.
normal
,
initialCameraPosition:
CameraPosition
(
target:
LatLng
(
40.712776
,
-
74.005974
),
zoom:
12
),
onMapCreated:
(
GoogleMapController
controller
)
{
_controller
.
complete
(
controller
);
},
);
// Provide the childWidget to the Container.
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Dashboard
()));
// Search for the childWidget in the tree and verify it exists.
expect
(
find
.
byType
(
GoogleMap
),
findsOneWidget
);
});
testWidgets
(
'finds a navigation bar'
,
(
WidgetTester
tester
)
async
{
final
navBar
=
AppBar
(
elevation:
15
,
centerTitle:
true
,
backgroundColor:
Color
.
fromRGBO
(
58
,
144
,
58
,
1
),
title:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Text
(
"bisaGo"
,
style:
TextStyle
(
fontSize:
25
,
fontFamily:
'Comfortaa'
,
fontWeight:
FontWeight
.
w800
),
),
],
),
);
// Provide the childWidget to the Container.
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Dashboard
()));
// Search for the childWidget in the tree and verify it exists.
expect
(
find
.
byType
(
Scaffold
),
findsOneWidget
);
expect
(
find
.
byType
(
Theme
),
findsOneWidget
);
expect
(
find
.
byType
(
AppBar
),
findsOneWidget
);
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Dashboard
()));
// Search for the childWidget in the tree and verify it exists.
expect
(
find
.
byType
(
GoogleMap
),
findsOneWidget
);
});
testWidgets
(
'Shows dashboard on App Start'
,
(
WidgetTester
tester
)
async
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment