Compare commits
2 Commits
add-homepa
...
3cfc545d89
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cfc545d89 | ||
|
|
092b11e14f |
|
Before Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 597 B |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 429 B |
BIN
images/task.png
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 467 B |
@@ -8,11 +8,8 @@ class Constant {
|
|||||||
static double designWidthPhone = 390;
|
static double designWidthPhone = 390;
|
||||||
|
|
||||||
// color theme
|
// color theme
|
||||||
static Color textTrueBlack = const Color(0xff000000);
|
|
||||||
static Color textBlack = const Color(0xff212B36);
|
static Color textBlack = const Color(0xff212B36);
|
||||||
static Color textDarkGrey = const Color(0xff637381);
|
|
||||||
static Color textLightGrey = const Color(0xff919EAB);
|
static Color textLightGrey = const Color(0xff919EAB);
|
||||||
static Color textOrange = const Color(0xffF15A29);
|
|
||||||
|
|
||||||
// size convertion
|
// size convertion
|
||||||
static double getActualXPhone({
|
static double getActualXPhone({
|
||||||
@@ -37,14 +34,6 @@ class Constant {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextStyle titleH1_500_18({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 18),
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
fontFamily: 'Public Sans'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle titleH2_600({required BuildContext context}) {
|
static TextStyle titleH2_600({required BuildContext context}) {
|
||||||
return TextStyle(
|
return TextStyle(
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 12),
|
fontSize: Constant.getActualYPhone(context: context, y: 12),
|
||||||
@@ -52,59 +41,10 @@ class Constant {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextStyle titleH2_600_14({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 14),
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontFamily: 'Public Sans'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle titleH2_700({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontFamily: 'Quicksand',
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 14),
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static TextStyle logintitle_700({required BuildContext context}) {
|
static TextStyle logintitle_700({required BuildContext context}) {
|
||||||
return TextStyle(
|
return TextStyle(
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 15),
|
fontSize: Constant.getActualYPhone(context: context, y: 15),
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static TextStyle time_700({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 28),
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontFamily: 'Quicksand',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle subtitle_600_14({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 14),
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
fontFamily: 'Public Sans',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle subtitle_500_12({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 12),
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
fontFamily: 'Public Sans',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle date_600({required BuildContext context}) {
|
|
||||||
return TextStyle(
|
|
||||||
fontSize: Constant.getActualYPhone(context: context, y: 16),
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontFamily: 'Quicksand',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:absensi_sas_flutter/screen/homepage/homepage_screen.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../test_flutter_map.dart';
|
import '../test_flutter_map.dart';
|
||||||
import '../screen/login/login_screen.dart';
|
import '../screen/login/login_screen.dart';
|
||||||
@@ -7,7 +6,6 @@ import '../screen/splash/splash_screen.dart';
|
|||||||
const loginRoute = "/loginRoute";
|
const loginRoute = "/loginRoute";
|
||||||
const splashRoute = "/splashRoute";
|
const splashRoute = "/splashRoute";
|
||||||
const testFlutterMapRoute = "/testFlutterMapRoute";
|
const testFlutterMapRoute = "/testFlutterMapRoute";
|
||||||
const homepageRoute = "/homepageRoute";
|
|
||||||
|
|
||||||
class AppRoute {
|
class AppRoute {
|
||||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||||
@@ -45,17 +43,6 @@ class AppRoute {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// homepage
|
|
||||||
if (settings.name == homepageRoute) {
|
|
||||||
return MaterialPageRoute(builder: (context) {
|
|
||||||
return MediaQuery(
|
|
||||||
data: MediaQuery.of(context)
|
|
||||||
.copyWith(textScaleFactor: 1.0, padding: EdgeInsets.all(0)),
|
|
||||||
child: HomepageScreen(),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return MaterialPageRoute(builder: (context) {
|
return MaterialPageRoute(builder: (context) {
|
||||||
return MediaQuery(
|
return MediaQuery(
|
||||||
data: MediaQuery.of(context)
|
data: MediaQuery.of(context)
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:intl/date_symbol_data_local.dart';
|
|
||||||
import '../app/route.dart';
|
import '../app/route.dart';
|
||||||
// import '../test_map.dart';
|
// import '../test_map.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
await initializeDateFormatting('id_ID', null);
|
|
||||||
runApp(const ProviderScope(child: MyApp()));
|
runApp(const ProviderScope(child: MyApp()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +25,7 @@ class MyApp extends StatelessWidget {
|
|||||||
primarySwatch: Colors.orange,
|
primarySwatch: Colors.orange,
|
||||||
),
|
),
|
||||||
// home: TestMap(),
|
// home: TestMap(),
|
||||||
initialRoute: homepageRoute,
|
initialRoute: loginRoute,
|
||||||
// initialRoute: testFlutterMapRoute,
|
// initialRoute: testFlutterMapRoute,
|
||||||
onGenerateRoute: AppRoute.generateRoute,
|
onGenerateRoute: AppRoute.generateRoute,
|
||||||
);
|
);
|
||||||
|
|||||||
100
lib/repository/base_repository.dart
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
|
||||||
|
abstract class BaseRepository {
|
||||||
|
final Dio dio;
|
||||||
|
BaseRepository({required this.dio});
|
||||||
|
|
||||||
|
Future<Map<String, dynamic>> post({
|
||||||
|
required Map<String, dynamic> param,
|
||||||
|
required String service,
|
||||||
|
String? token,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final response = await dio.post(
|
||||||
|
service,
|
||||||
|
data: jsonEncode(param),
|
||||||
|
options: Options(
|
||||||
|
headers: token != null
|
||||||
|
? {
|
||||||
|
HttpHeaders.contentTypeHeader: "application/json",
|
||||||
|
HttpHeaders.authorizationHeader: "Bearer $token",
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
HttpHeaders.contentTypeHeader: "application/json",
|
||||||
|
},
|
||||||
|
contentType: "application/json",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (response.statusCode != 200) {
|
||||||
|
throw BaseRepositoryException(
|
||||||
|
message: "Invalid Http Response ${response.statusCode}",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Map<String, dynamic> jsonData = jsonDecode(response.data);
|
||||||
|
if (jsonData["status"] != "OK") {
|
||||||
|
throw BaseRepositoryException(
|
||||||
|
message: jsonData["message"],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return jsonData;
|
||||||
|
}
|
||||||
|
} on DioError catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
} on SocketException catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
} on BaseRepositoryException catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Map<String, dynamic>> get({
|
||||||
|
required String service,
|
||||||
|
String? token,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
final response = await dio.get(
|
||||||
|
service,
|
||||||
|
options: Options(
|
||||||
|
headers: token != null
|
||||||
|
? {
|
||||||
|
HttpHeaders.contentTypeHeader: "application/json",
|
||||||
|
HttpHeaders.authorizationHeader: "Bearer $token",
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
HttpHeaders.contentTypeHeader: "application/json",
|
||||||
|
},
|
||||||
|
contentType: "application/json",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (response.statusCode != 200) {
|
||||||
|
throw BaseRepositoryException(
|
||||||
|
message: "Invalid Http Response ${response.statusCode}",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Map<String, dynamic> jsonData = jsonDecode(response.data);
|
||||||
|
if (jsonData["status"] != "OK") {
|
||||||
|
throw BaseRepositoryException(
|
||||||
|
message: jsonData["message"],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return jsonData;
|
||||||
|
}
|
||||||
|
} on DioError catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
} on SocketException catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
} on BaseRepositoryException catch (e) {
|
||||||
|
throw BaseRepositoryException(message: e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BaseRepositoryException implements Exception {
|
||||||
|
final String? message;
|
||||||
|
BaseRepositoryException({
|
||||||
|
required this.message,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,623 +0,0 @@
|
|||||||
import 'package:absensi_sas_flutter/app/constant.dart';
|
|
||||||
import 'package:absensi_sas_flutter/screen/widget/real_date.dart';
|
|
||||||
import 'package:absensi_sas_flutter/screen/widget/real_time.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class HomepageScreen extends StatelessWidget {
|
|
||||||
const HomepageScreen({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
|
||||||
floatingActionButton: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 100),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 100),
|
|
||||||
child: FittedBox(
|
|
||||||
child: FloatingActionButton(
|
|
||||||
onPressed: () {},
|
|
||||||
backgroundColor: Color(0xFFFFFFFF),
|
|
||||||
shape: CircleBorder(),
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 50),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 50),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(
|
|
||||||
'images/finger_tap_orange_botnav.png'), // Ganti dengan path gambar Anda
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
bottomNavigationBar: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 390),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 84),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFFFFFFF),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
offset: Offset(0, -1),
|
|
||||||
blurRadius: 8,
|
|
||||||
spreadRadius: -8,
|
|
||||||
color: Color.fromRGBO(0, 0, 0, 0.10),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Image(
|
|
||||||
image: AssetImage('images/home_orange.png'),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Beranda',
|
|
||||||
style: Constant.subtitle_500_12(context: context).copyWith(
|
|
||||||
color: Constant.textOrange,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Image(
|
|
||||||
image: AssetImage('images/person_grey.png'),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Profile',
|
|
||||||
style: Constant.subtitle_500_12(context: context).copyWith(
|
|
||||||
color: Constant.textLightGrey,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: SafeArea(
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 390),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 844),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: Constant.getActualYPhone(context: context, y: 58),
|
|
||||||
left: Constant.getActualXPhone(context: context, x: 33),
|
|
||||||
right: Constant.getActualXPhone(context: context, x: 27),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
child: ListTile(
|
|
||||||
leading: Container(
|
|
||||||
width:
|
|
||||||
Constant.getActualXPhone(context: context, x: 36),
|
|
||||||
height:
|
|
||||||
Constant.getActualYPhone(context: context, y: 36),
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage('images/avatar_c.png'),
|
|
||||||
)),
|
|
||||||
title: Text(
|
|
||||||
"Stephen Kusumo",
|
|
||||||
style: Constant.titleH1_700(context: context)
|
|
||||||
..copyWith(
|
|
||||||
color: Constant.textBlack,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
subtitle: Text(
|
|
||||||
"Step@example.com",
|
|
||||||
style:
|
|
||||||
Constant.subtitle_500_12(context: context).copyWith(
|
|
||||||
color: Constant.textLightGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
trailing: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 36),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 36),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
|
||||||
color: Colors.white,
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
offset: Offset(0, 12),
|
|
||||||
blurRadius: 24,
|
|
||||||
color: Color.fromRGBO(145, 158, 171, 0.12),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: Container(
|
|
||||||
width:
|
|
||||||
Constant.getActualXPhone(context: context, x: 20),
|
|
||||||
height:
|
|
||||||
Constant.getActualYPhone(context: context, y: 20),
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage('images/alert_badge.png'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 44),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Card Time
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: Constant.getActualXPhone(context: context, x: 33),
|
|
||||||
right: Constant.getActualXPhone(context: context, x: 27),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 330),
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 200),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(40),
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(
|
|
||||||
'images/card_bg_1.png'), // Ganti dengan path gambar Anda
|
|
||||||
fit: BoxFit.fill, // Sesuaikan cara gambar ditampilkan
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: Constant.getActualYPhone(context: context, y: 16),
|
|
||||||
left: Constant.getActualXPhone(context: context, x: 25),
|
|
||||||
right: Constant.getActualXPhone(context: context, x: 25),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 280),
|
|
||||||
height:
|
|
||||||
Constant.getActualYPhone(context: context, y: 150),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
// Date
|
|
||||||
RealTimeFormattedDate(),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Time
|
|
||||||
RealTimeClock(), // Menampilkan waktu real-time menggunakan RealTimeClock
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 20),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment
|
|
||||||
.center, // Menengahkan secara horizontal
|
|
||||||
children: [
|
|
||||||
Spacer(), // Spasi di sebelah kiri "Check In"
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'images/finger_tap.png', // Path gambar untuk "Check In"
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 22),
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 22),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'--:--',
|
|
||||||
style: TextStyle(
|
|
||||||
// Atur gaya teks '--:--' sesuai kebutuhan
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Clock In',
|
|
||||||
style:
|
|
||||||
Constant.titleH2_700(context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textLightGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 96),
|
|
||||||
), // Jarak antara "Check In" dan "Check Out"
|
|
||||||
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'images/finger_tap.png', // Path gambar untuk "Check Out"
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 22),
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 22),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'--:--',
|
|
||||||
style: TextStyle(
|
|
||||||
// Atur gaya teks '--:--' sesuai kebutuhan
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Clock Out',
|
|
||||||
style:
|
|
||||||
Constant.titleH2_700(context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textLightGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Spacer(), // Spasi di sebelah kanan "Check Out"
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 16),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 56),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Menu Cuti Lembur
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: Constant.getActualXPhone(context: context, x: 33),
|
|
||||||
right: Constant.getActualXPhone(context: context, x: 27),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 330),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
//Menu Cuti
|
|
||||||
Container(
|
|
||||||
width:
|
|
||||||
Constant.getActualXPhone(context: context, x: 98),
|
|
||||||
// color: Colors.amber,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(145, 158, 171, 0.20),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: Constant.getActualXPhone(
|
|
||||||
context: context, x: 12),
|
|
||||||
right: Constant.getActualXPhone(
|
|
||||||
context: context, x: 12),
|
|
||||||
top: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
bottom: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: Image(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 50),
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 50),
|
|
||||||
image: AssetImage('images/person.png'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Cuti',
|
|
||||||
style:
|
|
||||||
Constant.titleH2_600_14(context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textDarkGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
width:
|
|
||||||
Constant.getActualXPhone(context: context, x: 18),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Menu Lembur
|
|
||||||
Container(
|
|
||||||
width:
|
|
||||||
Constant.getActualXPhone(context: context, x: 98),
|
|
||||||
// color: Colors.amber,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(145, 158, 171, 0.20),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: Constant.getActualXPhone(
|
|
||||||
context: context, x: 12),
|
|
||||||
right: Constant.getActualXPhone(
|
|
||||||
context: context, x: 12),
|
|
||||||
top: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
bottom: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: Image(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 50),
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 50),
|
|
||||||
image: AssetImage('images/task.png'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 8),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Lembur',
|
|
||||||
style:
|
|
||||||
Constant.titleH2_600_14(context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textDarkGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(context: context, y: 56),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Menu Rekap Presensi
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
right: Constant.getActualXPhone(context: context, x: 27),
|
|
||||||
left: Constant.getActualXPhone(context: context, x: 33),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
width: Constant.getActualXPhone(context: context, x: 330),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'Rekap Presensi Bulan Ini',
|
|
||||||
style:
|
|
||||||
Constant.titleH1_500_18(context: context).copyWith(
|
|
||||||
color: Constant.textTrueBlack,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height:
|
|
||||||
Constant.getActualYPhone(context: context, y: 20),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
color: Colors.white, // Set background color to #FFF
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(145, 158, 171, 0.20),
|
|
||||||
blurRadius: 2,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: Constant.getActualYPhone(
|
|
||||||
context: context, y: 12),
|
|
||||||
bottom: Constant.getActualYPhone(
|
|
||||||
context: context, y: 12),
|
|
||||||
left: Constant.getActualXPhone(
|
|
||||||
context: context, x: 24),
|
|
||||||
right: Constant.getActualXPhone(
|
|
||||||
context: context, x: 24),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'24 hari',
|
|
||||||
style: Constant.subtitle_600_14(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textOrange,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 4),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'images/person_available_grey.png'),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 4),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Kehadiran',
|
|
||||||
style: Constant.subtitle_500_12(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textDarkGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Image(
|
|
||||||
image: AssetImage('images/divider.png'),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Tidak Hadir
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'2 hari',
|
|
||||||
style: Constant.subtitle_600_14(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textOrange,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 4),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'images/person_delete_grey.png'),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 4),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Tidak Hadir',
|
|
||||||
style: Constant.subtitle_500_12(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textDarkGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Image(
|
|
||||||
image: AssetImage('images/divider.png'),
|
|
||||||
),
|
|
||||||
|
|
||||||
//Tidak Hadir
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'5 hari',
|
|
||||||
style: Constant.subtitle_600_14(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textOrange,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: Constant.getActualYPhone(
|
|
||||||
context: context, y: 4),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Image(
|
|
||||||
image: AssetImage(
|
|
||||||
'images/task_pending_grey.png'),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: Constant.getActualXPhone(
|
|
||||||
context: context, x: 4),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Lembur',
|
|
||||||
style: Constant.subtitle_500_12(
|
|
||||||
context: context)
|
|
||||||
.copyWith(
|
|
||||||
color: Constant.textDarkGrey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +1,75 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:google_sign_in/google_sign_in.dart';
|
import 'package:google_sign_in/google_sign_in.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
import '../../app/constant.dart';
|
import '../../app/constant.dart';
|
||||||
import '../../provider/google_login_provider.dart';
|
import '../../provider/google_login_provider.dart';
|
||||||
|
|
||||||
|
import 'package:crypton/crypton.dart' as crypton;
|
||||||
|
|
||||||
class LoginScreen extends HookConsumerWidget {
|
class LoginScreen extends HookConsumerWidget {
|
||||||
const LoginScreen({super.key});
|
const LoginScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
|
||||||
// inisialisasi
|
// inisialisasi
|
||||||
// ref.watch itu sama spt memantau state terus menerus
|
// ref.watch itu sama spt memantau state terus menerus
|
||||||
// ref.read itu memantau namun hny 1x saja
|
// ref.read itu memantau namun hny 1x saja
|
||||||
GoogleSignInAccount? currentUser = ref.watch(currentUserProvider);
|
GoogleSignInAccount? currentUser = ref.watch(currentUserProvider);
|
||||||
final googleSignIn = ref.watch(googleSignInProvider);
|
final googleSignIn = ref.watch(googleSignInProvider);
|
||||||
|
|
||||||
|
Future<void> postPublicKey() async {
|
||||||
|
Dio dio = Dio();
|
||||||
|
String url = "https://example.com/api/post_endpoint";
|
||||||
|
try {
|
||||||
|
final publicPem = await rootBundle.loadString('assets/public_key.pem');
|
||||||
|
final publicKey = crypton.RSAPublicKey.fromPEM(publicPem);
|
||||||
|
|
||||||
|
// GoogleSignInAccount? currentUser = ref.watch(currentUserProvider);
|
||||||
|
// final googleSignIn = ref.watch(googleSignInProvider);
|
||||||
|
// return filePath;
|
||||||
|
|
||||||
|
publicKey.encrypt("testing satu dua tiga");
|
||||||
|
Map<String, dynamic> data = {
|
||||||
|
"publickey": publicKey,
|
||||||
|
"id_google_sign_in": "102110797605607117832",
|
||||||
|
"email": "sindhu@sismedia.com"
|
||||||
|
};
|
||||||
|
|
||||||
|
Response response = await dio.post(
|
||||||
|
url,
|
||||||
|
data: data,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Menampilkan respons dari server
|
||||||
|
print("Response data: ${response.data}");
|
||||||
|
|
||||||
|
// googleSignIn.onCurrentUserChanged.listen((account) {
|
||||||
|
// // untuk update value ke provider google_login_provider yaitu currentUserProvider
|
||||||
|
// ref.read(currentUserProvider.notifier).update((state) => account);
|
||||||
|
// });
|
||||||
|
// googleSignIn.signInSilently();
|
||||||
|
} catch (e) {
|
||||||
|
print("Error reading file: $e");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
googleSignIn.onCurrentUserChanged.listen((account) {
|
// googleSignIn.onCurrentUserChanged.listen((account) {
|
||||||
// untuk update value ke provider google_login_provider yaitu currentUserProvider
|
// // untuk update value ke provider google_login_provider yaitu currentUserProvider
|
||||||
ref.read(currentUserProvider.notifier).update((state) => account);
|
// ref.read(currentUserProvider.notifier).update((state) => account);
|
||||||
});
|
// });
|
||||||
googleSignIn.signInSilently();
|
// googleSignIn.signInSilently();
|
||||||
return (){};
|
|
||||||
|
postPublicKey();
|
||||||
|
return () {};
|
||||||
}, const []);
|
}, const []);
|
||||||
|
|
||||||
// fungsi untuk sync ke google mail
|
// fungsi untuk sync ke google mail
|
||||||
@@ -47,7 +91,7 @@ class LoginScreen extends HookConsumerWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: Constant.getActualYPhone(context: context, y: 100),
|
height: Constant.getActualYPhone(context: context, y: 100),
|
||||||
),
|
),
|
||||||
(currentUser != null)
|
(currentUser != null)
|
||||||
? Container(
|
? Container(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: GoogleUserCircleAvatar(
|
leading: GoogleUserCircleAvatar(
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
|
|
||||||
import 'package:absensi_sas_flutter/app/constant.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
|
||||||
|
|
||||||
class RealTimeFormattedDate extends StatefulWidget {
|
|
||||||
@override
|
|
||||||
_RealTimeFormattedDateState createState() => _RealTimeFormattedDateState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _RealTimeFormattedDateState extends State<RealTimeFormattedDate> {
|
|
||||||
late Stream<DateTime> _clockStream;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_clockStream = Stream<DateTime>.periodic(Duration(seconds: 1), (i) => DateTime.now());
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return StreamBuilder<DateTime>(
|
|
||||||
stream: _clockStream,
|
|
||||||
builder: (context, snapshot) {
|
|
||||||
if (snapshot.hasData) {
|
|
||||||
String formattedDate = DateFormat('EEEE, d MMMM y', 'id_ID').format(snapshot.data!);
|
|
||||||
return Text(
|
|
||||||
formattedDate,
|
|
||||||
style: Constant.date_600(context: context).copyWith(
|
|
||||||
color: Constant.textBlack),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Text('Loading...');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
|
|
||||||
import 'package:absensi_sas_flutter/app/constant.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
|
||||||
|
|
||||||
class RealTimeClock extends StatefulWidget {
|
|
||||||
@override
|
|
||||||
_RealTimeClockState createState() => _RealTimeClockState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _RealTimeClockState extends State<RealTimeClock> {
|
|
||||||
late Stream<DateTime> _clockStream;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_clockStream = Stream<DateTime>.periodic(Duration(seconds: 1), (i) => DateTime.now());
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return StreamBuilder<DateTime>(
|
|
||||||
stream: _clockStream,
|
|
||||||
builder: (context, snapshot) {
|
|
||||||
if (snapshot.hasData) {
|
|
||||||
String formattedTime = DateFormat('HH:mm:ss').format(snapshot.data!);
|
|
||||||
return Text(
|
|
||||||
formattedTime,
|
|
||||||
style: Constant.time_700(context: context).copyWith(
|
|
||||||
color: Constant.textBlack,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Text('Loading...');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,9 +6,11 @@ import FlutterMacOS
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import geolocator_apple
|
import geolocator_apple
|
||||||
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
|
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
|
||||||
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
}
|
}
|
||||||
|
|||||||
6
publickey/public.pem
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7Exn1YjlSoZ/ihKQbH04iogX1
|
||||||
|
auWL4In0i1x5akuvlSkkzoLRWXM7sbTrHIjyqDJuuFrcA/ilygYB4QYrIk3v8owS
|
||||||
|
HcJB64f3qCrxyE8dK4iPmtogH9Gb7+L2LMOV/UjHwtP3TgAiMEM55qVIf1qbQGxZ
|
||||||
|
WNtIR4RHD0uMVtOCtwIDAQAB
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
90
pubspec.lock
@@ -25,6 +25,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.4.2"
|
||||||
|
asn1lib:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: asn1lib
|
||||||
|
sha256: "21afe4333076c02877d14f4a89df111e658a6d466cbfc802eb705eb91bd5adfd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -61,10 +69,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.17.1"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -81,6 +89,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3"
|
version: "3.0.3"
|
||||||
|
crypton:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: crypton
|
||||||
|
sha256: "17b6631fbf89e389d421b46629132287ed37d601b2ad1357445826ab85022271"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.1"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -388,26 +404,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16"
|
version: "0.12.15"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.2.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.9.1"
|
||||||
mgrs_dart:
|
mgrs_dart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -432,6 +448,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.8.3"
|
||||||
|
path_provider:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: path_provider
|
||||||
|
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
path_provider_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_android
|
||||||
|
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.2"
|
||||||
|
path_provider_foundation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_foundation
|
||||||
|
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.1"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -480,6 +520,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.8"
|
version: "2.1.8"
|
||||||
|
pointycastle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pointycastle
|
||||||
|
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.7.3"
|
||||||
polylabel:
|
polylabel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -577,10 +625,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.9.1"
|
||||||
sprintf:
|
sprintf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -593,10 +641,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.11.0"
|
||||||
state_notifier:
|
state_notifier:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -609,10 +657,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -633,10 +681,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.1"
|
version: "0.5.1"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -677,14 +725,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: web
|
|
||||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.3.0"
|
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -718,5 +758,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.2.0-194.0.dev <4.0.0"
|
dart: ">=3.0.6 <4.0.0"
|
||||||
flutter: ">=3.10.0"
|
flutter: ">=3.10.0"
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ dependencies:
|
|||||||
flutter_map: ^6.1.0
|
flutter_map: ^6.1.0
|
||||||
latlong2: ^0.9.0
|
latlong2: ^0.9.0
|
||||||
google_sign_in: ^6.1.6
|
google_sign_in: ^6.1.6
|
||||||
|
crypton: ^2.2.1
|
||||||
|
path_provider: ^2.0.2
|
||||||
intl: ^0.17.0
|
intl: ^0.17.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
@@ -73,6 +75,7 @@ flutter:
|
|||||||
# To add assets to your application, add an assets section, like this:
|
# To add assets to your application, add an assets section, like this:
|
||||||
assets:
|
assets:
|
||||||
- images/
|
- images/
|
||||||
|
- publickey/
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|||||||
# https://github.com/flutter/flutter/issues/57146.
|
# https://github.com/flutter/flutter/issues/57146.
|
||||||
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
||||||
|
|
||||||
# Set fallback configurations for older versions of the flutter tool.
|
|
||||||
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
|
|
||||||
set(FLUTTER_TARGET_PLATFORM "windows-x64")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# === Flutter Library ===
|
# === Flutter Library ===
|
||||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
||||||
|
|
||||||
@@ -97,7 +92,7 @@ add_custom_command(
|
|||||||
COMMAND ${CMAKE_COMMAND} -E env
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
${FLUTTER_TOOL_ENVIRONMENT}
|
${FLUTTER_TOOL_ENVIRONMENT}
|
||||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
||||||
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
|
windows-x64 $<CONFIG>
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_target(flutter_assemble DEPENDS
|
add_custom_target(flutter_assemble DEPENDS
|
||||||
|
|||||||
@@ -31,11 +31,6 @@ bool FlutterWindow::OnCreate() {
|
|||||||
this->Show();
|
this->Show();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Flutter can complete the first frame before the "show window" callback is
|
|
||||||
// registered. The following call ensures a frame is pending to ensure the
|
|
||||||
// window is shown. It is a no-op if the first frame hasn't completed yet.
|
|
||||||
flutter_controller_->ForceRedraw();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||