Commit bc1bc4a3 authored by Dio Maulana's avatar Dio Maulana

add geo location permission

parent a6ea0422
<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>
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 StatelessWidget {
class BodyWidget extends StatefulWidget {
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(
......
......@@ -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:
......
......@@ -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:
......
Markdown is supported
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