fix: package name

This commit is contained in:
Supan Adit Pratama 2024-12-25 14:19:58 +07:00
parent 750dc08b25
commit 3f9a75ec73
7 changed files with 9 additions and 12 deletions

View File

@ -6,7 +6,7 @@ plugins {
} }
android { android {
namespace = "com.example.geosmart" namespace = "com.supanadit.geosmart"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion ndkVersion = flutter.ndkVersion
@ -21,7 +21,7 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.geosmart" applicationId = "com.supanadit.geosmart"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config. // For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion minSdk = flutter.minSdkVersion

View File

@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application <application
android:label="geosmart" android:label="Geo Smart App"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"> android:usesCleartextTraffic="true">

View File

@ -1,4 +1,4 @@
package com.example.geosmart package com.supanadit.geosmart
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">Geo Smart App</string> <string name="api_key">AIzaSyDFr0vWhicDGxcGfbomaoMhxvXHyvjwbFM</string>
<string name="api_key">YOUR_API_KEY</string>
</resources> </resources>

View File

@ -7,11 +7,9 @@ import 'package:geosmart/service/setting_service.dart';
class AuthenticationBloc class AuthenticationBloc
extends Bloc<AuthenticationEvent, AuthenticationState> { extends Bloc<AuthenticationEvent, AuthenticationState> {
// final Alice alice;
final Dio dio; final Dio dio;
AuthenticationBloc({ AuthenticationBloc({
// @required this.alice,
required this.dio, required this.dio,
}) : super(AuthenticationInitial()) { }) : super(AuthenticationInitial()) {
on<AuthenticationStarted>((event, emit) async { on<AuthenticationStarted>((event, emit) async {

View File

@ -6,7 +6,8 @@ class StartupPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Center( body: Center(
child: Container( child: SizedBox(
height: 50,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Loader(), Loader(),
@ -16,7 +17,6 @@ class StartupPage extends StatelessWidget {
Text("Preparing System") Text("Preparing System")
], ],
), ),
height: 50,
), ),
), ),
); );

View File

@ -17,14 +17,14 @@ class SettingService {
} }
Future<SettingModel> clearSetting() async { Future<SettingModel> clearSetting() async {
SharedPreferences sharedPreferences = await this.getSharedPreferences(); SharedPreferences sharedPreferences = await getSharedPreferences();
sharedPreferences.remove(_host); sharedPreferences.remove(_host);
sharedPreferences.remove(_id); sharedPreferences.remove(_id);
return await getSetting(); return await getSetting();
} }
Future<SettingModel> getSetting() async { Future<SettingModel> getSetting() async {
SharedPreferences sharedPreferences = await this.getSharedPreferences(); SharedPreferences sharedPreferences = await getSharedPreferences();
return SettingModel( return SettingModel(
sharedPreferences.getString(_host) ?? '', sharedPreferences.getString(_host) ?? '',
sharedPreferences.getString(_id) ?? '', sharedPreferences.getString(_id) ?? '',