Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
Crm Attendance
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Crm Attendance
Commits
bc1bc4a3
Commit
bc1bc4a3
authored
Jun 02, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add geo location permission
parent
a6ea0422
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
28 deletions
+82
-28
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+8
-21
home.dart
lib/page/home/home.dart
+65
-7
pubspec.lock
pubspec.lock
+8
-0
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
android/app/src/main/AndroidManifest.xml
View file @
bc1bc4a3
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.excelso_attendance"
>
<application
android:label=
"excelso_attendance"
android:name=
"${applicationName}"
android:icon=
"@mipmap/ic_launcher"
>
<activity
android:name=
".MainActivity"
android:exported=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated=
"true"
android:windowSoftInputMode=
"adjustResize"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.excelso_attendance"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<application
android:label=
"excelso_attendance"
android:name=
"${applicationName}"
android:icon=
"@mipmap/ic_launcher"
>
<activity
android:name=
".MainActivity"
android:exported=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated=
"true"
android:windowSoftInputMode=
"adjustResize"
>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name=
"io.flutter.embedding.android.NormalTheme"
android:resource=
"@style/NormalTheme"
/>
<meta-data
android:name=
"io.flutter.embedding.android.NormalTheme"
android:resource=
"@style/NormalTheme"
/>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
...
...
@@ -27,8 +16,6 @@
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name=
"flutterEmbedding"
android:value=
"2"
/>
<meta-data
android:name=
"flutterEmbedding"
android:value=
"2"
/>
</application>
</manifest>
lib/page/home/home.dart
View file @
bc1bc4a3
import
'package:autocomplete_textfield/autocomplete_textfield.dart'
;
import
'package:excelso_attendance/helper/arguments/route_args.dart'
;
import
'package:excelso_attendance/helper/component/button.dart'
;
import
'package:excelso_attendance/helper/component/text_field.dart'
;
...
...
@@ -11,29 +12,35 @@ import 'package:excelso_attendance/resource/style.dart';
import
'package:flutter/material.dart'
;
class
HomeView
extends
StatelessWidget
{
HomeView
({
super
.
key
});
final
TextEditingController
nikController
=
TextEditingController
();
const
HomeView
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
ColorManager
.
backgroundColor
,
body:
ScreenResponsive
(
widget:
BodyWidget
(
nikController:
nikController
),
widget:
const
BodyWidget
(
),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
),
);
}
}
class
BodyWidget
extends
State
less
Widget
{
class
BodyWidget
extends
State
ful
Widget
{
const
BodyWidget
({
super
.
key
,
required
this
.
nikController
,
});
final
TextEditingController
nikController
;
@override
State
<
BodyWidget
>
createState
()
=>
_BodyWidgetState
();
}
class
_BodyWidgetState
extends
State
<
BodyWidget
>
{
final
List
<
String
>
suggestion
=
const
[
"TEST"
,
"TEST2"
,
"ABC"
];
final
GlobalKey
<
AutoCompleteTextFieldState
<
String
>>
autoCompleteKey
=
GlobalKey
();
final
TextEditingController
nikController
=
TextEditingController
();
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -228,6 +235,57 @@ class BodyWidget extends StatelessWidget {
borderSideActive:
true
,
hintText:
"NIK"
,
),
// child: AutoCompleteTextField(
// controller: nikController,
// itemSubmitted: (item) {
// nikController.text = item;
// },
// clearOnSubmit: false,
// key: autoCompleteKey,
// suggestions: suggestion,
// itemBuilder: (c, item) {
// return Container(
// padding: EdgeInsets.all(AppPadding.p20),
// child: Row(
// children: [
// Text(
// item,
// style: getRegularStyle(
// color: Colors.grey,
// ),
// )
// ],
// ),
// );
// },
// itemSorter: (a, b) {
// return a.compareTo(b);
// },
// itemFilter: (item, query) {
// return item.toString().startsWith(query.toLowerCase());
// },
// decoration: InputDecoration(
// hintText: "NIK",
// hintStyle: getRegularStyle(
// color: Colors.grey,
// ),
// enabledBorder: OutlineInputBorder(
// borderSide:
// BorderSide(width: 0.4, color: ColorManager.grey),
// borderRadius: BorderRadius.circular(5),
// ),
// focusedBorder: OutlineInputBorder(
// borderSide:
// BorderSide(width: 0.4, color: ColorManager.grey),
// borderRadius: BorderRadius.circular(5),
// ),
// disabledBorder: OutlineInputBorder(
// borderSide:
// BorderSide(width: 0.4, color: ColorManager.grey),
// borderRadius: BorderRadius.circular(5),
// ),
// ),
// ),
),
),
Container
(
...
...
pubspec.lock
View file @
bc1bc4a3
...
...
@@ -25,6 +25,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.11.0"
autocomplete_textfield:
dependency: "direct main"
description:
name: autocomplete_textfield
sha256: "8170e66d381c21623f1cfbb957ab9c6b5a45d9c50a6daac7fc57dbc3ba94abb4"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
boolean_selector:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
bc1bc4a3
...
...
@@ -29,6 +29,7 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies
:
autocomplete_textfield
:
^2.0.1
camera
:
^0.10.5+2
cupertino_icons
:
^1.0.2
flutter
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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