Merge pull request #1 from WDI-Ideas/basicstructure

basic strucures and folders
This commit is contained in:
Shubham Shetty
2024-05-23 15:44:07 +05:30
committed by GitHub
29 changed files with 2598 additions and 118 deletions

View File

@@ -1,9 +1,22 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.regroup">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<application
android:label="regroup"
android:requestLegacyExternalStorage="true"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity
android:name=".MainActivity"
android:exported="true"

View File

@@ -0,0 +1,120 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:path/path.dart' as path;
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class TextInputField extends StatefulWidget {
TextInputField({Key? key, this.hinttext, this.controller, this.validator})
: super(key: key);
final String? hinttext;
final TextEditingController? controller;
dynamic validator;
@override
State<TextInputField> createState() => _TextInputFieldState();
}
class _TextInputFieldState extends State<TextInputField> {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: 46.h,
child: TextFormField(
inputFormatters: [
RemoveEmojiInputFormatter(),
],
controller: widget.controller,
validator: widget.validator ??
(value) {
if (value == null || value.isEmpty) {
return "Empty value";
}
return null;
},
decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(
vertical: 12.0,
horizontal: 16), //<-- Adjust the vertical padding as needed
hintText: widget.hinttext,
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
width: 1, color: Color(0x7FE8C69F)), //<-- SEE HERE
borderRadius: BorderRadius.circular(5.0),
),
border: OutlineInputBorder(
borderSide: const BorderSide(
width: 1, color: Color(0x7FE8C69F)), //<-- SEE HERE
borderRadius: BorderRadius.circular(5.0),
),
enabledBorder: OutlineInputBorder(
borderSide: const BorderSide(
width: 1, color: Color(0x7FE8C69F)), //<-- SEE HERE
borderRadius: BorderRadius.circular(5.0),
),
),
),
);
}
}
Widget MessageTextInputField(
String hinttext, TextEditingController controller, dynamic validator) {
return TextFormField(
inputFormatters: [
RemoveEmojiInputFormatter()
],
// maxLength: 5,
autovalidateMode: AutovalidateMode.onUserInteraction,
maxLines: 5,
validator: validator,
controller: controller,
decoration: InputDecoration(
labelStyle: const TextStyle(color: Colors.black),
errorStyle: TextStyle(
fontSize: 13.sp,
color: Color.fromARGB(255, 245, 130, 122),
),
contentPadding: const EdgeInsets.symmetric(
vertical: 12.0,
horizontal: 16), //<-- Adjust the vertical padding as needed
filled: true,
fillColor: Color(0xFFFFF3E4),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
hintText: hinttext,
hintStyle: const TextStyle(
color: Color(0xFF737373),
fontSize: 14,
fontWeight: FontWeight.w400,
fontFamily: "DM Sans"),
// focusedBorder: const OutlineInputBorder(borderSide: BorderSide.none),
// border: const OutlineInputBorder(borderSide: BorderSide.none),
// enabledBorder: const OutlineInputBorder(borderSide: BorderSide.none),
),
keyboardType: TextInputType.text,
);
}

View File

@@ -0,0 +1,53 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Utils/colors.dart';
class CustomInvestNowButton extends StatelessWidget {
const CustomInvestNowButton({
Key? key,
GlobalKey<FormState>? form,
this.ontap,
required this.text,
this.colorchange = false,
this.productid,
}) : super(key: key);
final bool colorchange;
final GestureTapCallback? ontap;
final String text;
final String? productid;
@override
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
height: 50.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 5,
shadowColor: Color.fromARGB(255, 220, 220, 226),
backgroundColor: AppColors.black,
// color: Color(0xFFFFB600),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.h),
),
),
onPressed: () {
ontap!();
// productid;
},
child: Text(
text,
style: TextStyle(
color: AppColors.white,
fontSize: 18.sp,
),
),
),
);
}
}

View File

@@ -0,0 +1,49 @@
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:shared_preferences/shared_preferences.dart';
class EntryPointController extends GetxController {
bool? _logedIn;
bool? get logedIn => _logedIn;
bool isMainScreen = true;
bool? _isLoading = true;
bool? get isLoading => _isLoading;
bool _signinApi = false;
bool get signinApi => _signinApi;
bool _createAccApi = false;
bool get createAccApi => _createAccApi;
changeSigninApiBool() {
_signinApi = !_signinApi;
update();
}
changeProfileEditApiBool() {
_signinApi = !_signinApi;
update();
}
changeSignupApiBool() {
_signinApi = !_signinApi;
update();
}
changeSignup2ApiBool() {
_signinApi = !_signinApi;
update();
}
changecreateAccApiBool() {
_createAccApi = !_createAccApi;
update();
}
checkLogin() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
_logedIn = prefs.getBool('LogedIn') ?? false;
_isLoading = false;
update();
}
}

View File

@@ -0,0 +1,255 @@
import 'dart:convert';
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:get/get.dart' hide Response;
import 'package:regroup/Global.dart';
import 'package:regroup/Utils/base_manager.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http;
import 'entry_point_controller.dart';
class NetworkApi {
Dio dio = Dio();
final controllerEntryPoint = Get.put(EntryPointController());
Future<ResponseData> getApi(String url) async {
if (kDebugMode) {
print("api url is >>> $url");
}
Response response;
SharedPreferences prefs = await SharedPreferences.getInstance();
token = prefs.getString('token');
try {
response = await dio.get(url,
options: Options(headers: {
"authorization": "Bearer $token",
'content-Type': 'application/json',
}));
} on Exception catch (_) {
return ResponseData<dynamic>(
'Oops something Went Wrong', ResponseStatus.FAILED);
}
if (response.statusCode == 200) {
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: response.data);
} else if (response.statusCode == 404) {
return ResponseData<dynamic>("error", ResponseStatus.ERROR,
data: response.data);
} else {
try {
return ResponseData<dynamic>(
response.data['message'].toString(), ResponseStatus.FAILED);
} catch (_) {
return ResponseData<dynamic>(
response.statusMessage!, ResponseStatus.FAILED);
}
}
}
Future<ResponseData> postApi({data, required String url}) async {
if (kDebugMode) {
print("data >>> $data");
print("api url is >>> $url");
}
Response response;
SharedPreferences prefs = await SharedPreferences.getInstance();
// ignore: unused_local_variable
String? token = prefs.getString('token').toString();
print("token is $token");
try {
response = await dio.post(url,
data: data,
options: Options(
headers: {
"authorization": "Bearer $token",
'content-Type': 'application/json',
"Accept": 'application/json'
},
));
} on Exception catch (e) {
if (e is DioException) {
log(e.response.toString());
}
return ResponseData<dynamic>(
'Opps something went wrong', ResponseStatus.FAILED);
}
// if (kDebugMode) {
// print(response);
// }
// print("response in post $response");
if (response.statusCode == 200) {
// print(response.data);
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: response.data);
} else {
try {
return ResponseData<dynamic>(
response.data['message'].toString(), ResponseStatus.FAILED);
} catch (_) {
return ResponseData<dynamic>(
response.statusMessage!, ResponseStatus.FAILED);
}
}
}
Future<ResponseData> postFileUploadApi({data, required String url}) async {
if (kDebugMode) {
print("data >>> $data");
print("api url is >>> $url");
}
Response response;
SharedPreferences prefs = await SharedPreferences.getInstance();
// ignore: unused_local_variable
String? token = prefs.getString('token').toString();
try {
response = await dio.post(url,
data: data,
options: Options(headers: {"authorization": "Bearer $token"}));
} on Exception catch (_) {
return ResponseData<dynamic>(
'Opps something went wrong', ResponseStatus.FAILED);
}
if (kDebugMode) {
print(response);
}
print("response in post $response");
if (response.statusCode == 200) {
// print(response.data);
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: response.data);
} else {
try {
return ResponseData<dynamic>(
response.data['message'].toString(), ResponseStatus.FAILED);
} catch (_) {
return ResponseData<dynamic>(
response.statusMessage!, ResponseStatus.FAILED);
}
}
}
Future<ResponseData<dynamic>> postApiHttp(
String token, String url, Map<String, String> body) async {
// var headers = {
// 'Authorization': 'Bearer 1867|aBb92qswYsEzQa8LJayiuQw6B3Wofuj6iluUumLx',
// 'Authorization': 'Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv',
// 'Cookie': 'laravel_session=eyJpdiI6ImcwS2NYNlJYam4wcU1YUXJsYWZsb2c9PSIsInZhbHVlIjoiK0hvT3c5NmZFQ0NDajYxTUFaaVluWkpYbUkwYk1JbldyTVJwZitMN05zWnliaVdBNWZjTXpyVG5UODM1MTBaMzQwUCtNc3lGak5MQWRZamh2dWIvdzIxQnNVVWQrQi9NUi9YTS9PQWgxMlZHTENUNU0zY0VVazluNEplTFFvbGgiLCJtYWMiOiJkNjA0NjA4YWJhZDkxODA0YmQ2MTViNzc1MTg4OWRiODMzMjI5OGE0ZDI3MDRhMTAzM2E1MGY4ODQyMjI1NGIxIiwidGFnIjoiIn0%3D'
// };
// controllerEntryPoint.logedIn!
// ?
// headers = {"authorization": "Bearer $token"};
// : headers = {
// "authorization":
// "Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv"
// };
var headers = {
'Accept': 'application/json',
'Authorization': token,
// 'Cookie': 'jerichoalternatives_session=eyJpdiI6Ik5KTWVUUnM2elR0b0Z0SWZneWY2Nmc9PSIsInZhbHVlIjoiY0s5WjV5UmJyZ3J2UUY1enY4KzZEblg5RmxWUm1KdXpmVWxQVTRKNUgyMThqRlJPK1lrcVhXMzJLMkhjSW5BdFJhNEgyTWFZQmM3Sll0aG52d1F4RGpSM0l4TlFWWlVPaUhpVFVsQ3lnaW8rSXJSY2Y2aG8ydFhqck8xTmlDaUMiLCJtYWMiOiI2MmNhZWZjYmZkMzBlYzhhZjcxNzRhMmM1OGJhYmRjM2JkOGMzM2Y3ZGFmMWViNWIyOTYyODY5ZDk3MmZmNGI3IiwidGFnIjoiIn0%3D'
};
var request = http.MultipartRequest('POST', Uri.parse(url));
request.fields.addAll(body);
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
print(response.statusCode);
if (response.statusCode == 200) {
var resp = await response.stream.bytesToString();
var jsonResp = jsonDecode(resp);
print(jsonResp);
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: jsonResp);
// return await response.stream.bytesToString();
} else if (response.statusCode == 201) {
var resp = await response.stream.bytesToString();
var jsonResp = jsonDecode(resp);
print(jsonResp);
return ResponseData<dynamic>(jsonResp["message"], ResponseStatus.PRIVATE,
data: jsonResp);
} else if (response.statusCode == 400) {
var resp = await response.stream.bytesToString();
var jsonResp = jsonDecode(resp);
print(jsonResp);
return ResponseData<dynamic>(
jsonResp["message"],
ResponseStatus.FAILED,
);
} else if (response.statusCode == 422) {
var resp = await response.stream.bytesToString();
var jsonResp = jsonDecode(resp);
print(jsonResp);
var errorMessage = jsonResp["errors"]["email2"].join(", ") + "\n" +
jsonResp["errors"]["contact_number2"].join(", ");
// return ResponseData<dynamic>(
// jsonResp["errors"][0]["email2"] +
// jsonResp["errors"][0]["contact_number2"],
// ResponseStatus.PRIVATE,
// );
return ResponseData<String>(
errorMessage,
ResponseStatus.PRIVATE,
);
} else if (response.statusCode == 500) {
var resp = await response.stream.bytesToString();
var jsonResp = jsonDecode(resp);
print(jsonResp);
return ResponseData<dynamic>(
jsonResp["message"],
ResponseStatus.FAILED,
);
} else {
return ResponseData<dynamic>(
response.reasonPhrase!,
ResponseStatus.FAILED,
);
}
}
Future<ResponseData> postslugApi(String url) async {
if (kDebugMode) {
print("api url is >>> $url");
}
Response response;
SharedPreferences prefs = await SharedPreferences.getInstance();
// String? token = prefs.getString('token');
String? token = prefs.getString('token').toString();
print("token is $token");
try {
response = await dio.post(url,
options: Options(headers: {"authorization": "Bearer $token"}));
} on Exception catch (_) {
return ResponseData<dynamic>(
'Oops something Went Wrong', ResponseStatus.FAILED);
}
if (response.statusCode == 200) {
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
data: response.data);
} else {
try {
return ResponseData<dynamic>(
response.data['message'].toString(), ResponseStatus.FAILED);
} catch (_) {
return ResponseData<dynamic>(
response.statusMessage!, ResponseStatus.FAILED);
}
}
}
}

View File

@@ -0,0 +1,81 @@
import 'dart:developer';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:dio/dio.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:regroup/Utils/dialogs.dart';
class Downloadpdfnew {
Future openFile({
required String url,
String? fileName,
}) async {
var status;
// Permission.manageExternalStorage.request();
final deviceInfo = await DeviceInfoPlugin().androidInfo;
if (deviceInfo.version.sdkInt > 32) {
status = await Permission.photos.request().isGranted;
await Permission.manageExternalStorage.request();
} else {
status = await Permission.storage.request().isGranted;
await Permission.manageExternalStorage.request();
}
if (status) {
await downloadFile(url, fileName!);
// if (file == null) {
// log("Error 3333333333333");
// } else {
// await OpenFile.open(file.path).then((value) {
// print("RUNNING THIS");
// if (value.type == ResultType.noAppToOpen) {
// ScaffoldMessenger.of(context).showSnackBar(Helper.displaySnackBar(
// "type",
// "error",
// "You do not have any application to open this file"));
// //Navigator.pop(context);
// } else {
// log(value.message);
// }
// });
// // if (message.toString() != "done") {
// // displaySnackBar("login", "error", message.message.toString());
// // }
// }
} else {
openAppSettings();
}
}
static Future<File?> downloadFile(String url, String name) async {
final appStorage = Directory("/storage/emulated/0/Download");
final file = File('${appStorage.path}/$name');
try {
utils.showToast("Downloading...");
final response = await Dio().get(
url,
options: Options(
// headers: requestHeaders,
responseType: ResponseType.bytes,
followRedirects: false,
// receiveTimeout: 0,
),
);
final raf = file.openSync(mode: FileMode.write);
raf.writeFromSync(response.data);
await raf.close();
utils.showToast("Download Completed !");
return file;
} catch (e) {
log(e.toString());
utils.showToast("Download Error! Please try again");
return null;
}
}
}

13
lib/Global.dart Normal file
View File

@@ -0,0 +1,13 @@
import 'dart:async';
import 'package:get/get.dart';
String? myusername;
String? token;
String? phonenumber;
bool pindialog = false;
bool storagedialog = false;
bool OnBoard = false;
RxInt notification = 0.obs;
late Timer timerhomeglobal;
bool isTimerInitialize = false;

View File

@@ -0,0 +1,101 @@
// ignore_for_file: non_constant_identifier_names, file_names, prefer_const_constructors
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
@override
Size get preferredSize => Size.fromHeight(height);
const CommonAppbar(
{Key? key,
required this.titleTxt,
this.showLeading = true,
this.customBack,
this.aifBack,
this.profileverifyback,
this.backPageName = '',
this.height = 105})
: super(key: key);
final String titleTxt;
final bool? showLeading;
final bool? customBack;
final bool? aifBack;
final String? backPageName;
final double height;
final bool? profileverifyback;
@override
Widget build(BuildContext context) {
return PreferredSize(
preferredSize: Size.fromHeight(130),
child: AppBar(
scrolledUnderElevation: 0.0,
backgroundColor: Color(0xFFFFF3E4),
elevation: 0,
leadingWidth: 56.w,
leading: Padding(
padding: EdgeInsets.only(left: 16.w, top: 20.h),
child: GestureDetector(
onTap: () {
// aifBack == true
// ?
// Get.back()
// :
// customBack ?? false ? Get.toNamed(backPageName!) :
// profileverifyback == true
// ?
// Get.offNamed(
// RouteName.investorprofile)
// :
Get.back();
},
child: Container(
height: 40.h,
width: 40.w,
decoration: const BoxDecoration(
color: Color(0xFFFFE3BF),
shape: BoxShape.circle,
),
child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 25.r,
),
),
),
),
),
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
titlePadding: EdgeInsets.all(0),
title: Padding(
padding: EdgeInsets.only(left: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
titleTxt,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 22,
fontFamily: 'Georgia'),
maxLines: 2,
softWrap: true,
),
// newTextfield(
// FontWeight.w400, 0)
],
),
),
),
),
);
}
}

View File

@@ -0,0 +1,137 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
// ignore: must_be_immutable
class CommonDropdownfield extends StatefulWidget {
CommonDropdownfield(
{Key? key,
this.validator,
this.inputFormatters,
required this.hintText,
required this.validatorText,
this.textEditingController,
this.leadingIcon,
this.readonly = false,
this.textCapital = false,
this.isInputPassword = false,
this.outlineColor = Colors.black,
this.texttype,
this.onInput,
this.onTap,
this.maxlines = 1,
this.suffixIcon})
: super(key: key);
dynamic validator;
final TextEditingController? textEditingController;
final String hintText;
final String validatorText;
final Widget? leadingIcon;
final bool isInputPassword;
final bool readonly;
final bool textCapital;
final dynamic inputFormatters;
final Color outlineColor;
final TextInputType? texttype;
Function(String)? onInput;
final VoidCallback? onTap;
final int maxlines;
final Widget? suffixIcon;
@override
State<CommonDropdownfield> createState() => _CommonDropdownfieldState();
}
class _CommonDropdownfieldState extends State<CommonDropdownfield> {
late bool obscureText;
var emojiFormatter = RemoveEmojiInputFormatter();
@override
void initState() {
super.initState();
obscureText = widget.isInputPassword;
}
Widget build(BuildContext context) {
List<TextInputFormatter> allFormatters = [emojiFormatter];
if (widget.inputFormatters != null) {
allFormatters.addAll(widget.inputFormatters);
}
return TextFormField(
textCapitalization: widget.textCapital
? TextCapitalization.characters
: TextCapitalization.none,
onTap: widget.onTap,
style: TextStyle(
fontSize: 16,
),
readOnly: widget.readonly,
maxLines: widget.maxlines,
cursorColor: const Color(0xFF1B8DC9),
autovalidateMode: AutovalidateMode.onUserInteraction,
obscureText: obscureText,
controller: widget.textEditingController,
decoration: InputDecoration(
errorStyle:
TextStyle(fontSize: 13, color: Color.fromARGB(255, 245, 130, 122)),
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
filled: true,
fillColor: Color(0xFFFFF3E4),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide:
BorderSide(color: Color.fromRGBO(232, 198, 159, 0.50), width: 1),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: Color(0xFFDBDBDB), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: BorderSide(color: Color(0xFF707070), width: 1),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
hintStyle: TextStyle(
color: Color(0xFF737373),
fontSize: 14,
fontWeight: FontWeight.w400,
fontFamily: "DM Sans"),
hintText: widget.hintText,
prefixIconColor: Color(0xFF737373),
prefixIcon: widget.leadingIcon == null
? null
: Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: widget.leadingIcon!,
),
suffixIcon: widget.suffixIcon == null
? null
: Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: widget.suffixIcon!,
),
),
keyboardType: widget.texttype,
validator: widget.validator ??
(value) {
if (value == null || value.isEmpty) {
return "Empty value";
}
return null;
},
inputFormatters: allFormatters,
onChanged: (value) {
widget.onInput?.call(value);
},
);
}
}

View File

@@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class CustomNextButton extends StatelessWidget {
final String text;
final Function onPressed;
final Color backgroundColor;
final double width;
final double height;
final Color textColor;
const CustomNextButton({
Key? key,
required this.text,
required this.onPressed,
this.backgroundColor = const Color(0xFFC18948),
this.width = double.infinity,
this.height = 50.0,
this.textColor = Colors.white,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () {
onPressed();
},
style: ElevatedButton.styleFrom(
backgroundColor: backgroundColor,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
minimumSize: Size(width, height),
),
child: FittedBox(
fit: BoxFit.contain,
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "Cambria",
fontWeight: FontWeight.w400,
fontSize: 20.sp,
color: Color(0xFFFFFFFF),
),
),
),
);
}
}

View File

@@ -0,0 +1,170 @@
// ignore_for_file: must_be_immutable
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class CustomTextFormField extends StatefulWidget {
CustomTextFormField({
Key? key,
this.validator,
this.inputFormatters,
this.hintText,
this.validatorText,
this.value,
this.textEditingController,
this.leadingIcon,
this.readonly = false,
this.enabled = true,
this.textCapital = false,
this.isInputPassword = false,
this.outlineColor = Colors.black,
this.bgColor = const Color(0xFFFFF3E4),
this.prefixIconColor = const Color(0xFF737373),
this.texttype,
this.onInput,
this.onTap,
this.maxlines = 1,
}) : super(key: key);
dynamic validator;
final TextEditingController? textEditingController;
final String? hintText;
final String? validatorText;
final String? value;
final Widget? leadingIcon;
final bool isInputPassword;
final bool readonly;
final bool enabled;
final bool textCapital;
final dynamic inputFormatters;
final Color outlineColor;
final Color bgColor;
final Color prefixIconColor;
final TextInputType? texttype;
Function(String)? onInput;
final VoidCallback? onTap;
final int maxlines;
@override
State<CustomTextFormField> createState() => _CustomtextFormFieldState();
}
class _CustomtextFormFieldState extends State<CustomTextFormField> {
late bool obscureText;
var emojiFormatter = RemoveEmojiInputFormatter();
@override
void initState() {
super.initState();
obscureText = widget.isInputPassword;
}
@override
Widget build(BuildContext context) {
List<TextInputFormatter> allFormatters = [emojiFormatter];
if (widget.inputFormatters != null) {
allFormatters.addAll(widget.inputFormatters);
}
return TextFormField(
textCapitalization: widget.textCapital
? TextCapitalization.characters
: TextCapitalization.none,
onTap: widget.onTap,
style: TextStyle(
fontSize: 16.sp,
),
initialValue: widget.value,
readOnly: widget.readonly,
enabled: widget.enabled,
//enableInteractiveSelection: false,
maxLines: widget.maxlines,
cursorColor: Colors.black,
autovalidateMode: AutovalidateMode.onUserInteraction,
obscureText: obscureText,
controller: widget.textEditingController,
decoration: InputDecoration(
labelStyle: const TextStyle(color: Colors.black),
errorStyle: TextStyle(
fontSize: 13.sp,
color: Color.fromARGB(255, 245, 130, 122),
),
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
filled: true,
fillColor: widget.bgColor,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(5),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
hintStyle: const TextStyle(
color: Color(0xFF737373),
fontSize: 14,
fontWeight: FontWeight.w400,
fontFamily: "DM Sans"),
hintText: widget.hintText,
prefixIconColor: widget.prefixIconColor,
// ignore: prefer_null_aware_operators
prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!,
suffixIcon: widget.isInputPassword
? GestureDetector(
onTap: () => setState(() => obscureText = !obscureText),
child: obscureText
? const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(right: 20.0),
child: Icon(
Icons.remove_red_eye,
color: Color(0xFF959595),
),
),
],
)
: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(right: 20.0),
child: Icon(
Icons.remove_red_eye_outlined,
color: Color(0xFF959595),
),
),
],
),
)
: null,
),
keyboardType: widget.texttype,
validator: widget.validator ??
(value) {
if (value == null || value.isEmpty) {
return "Empty value";
}
return null;
},
inputFormatters: allFormatters,
onChanged: (value) {
widget.onInput?.call(value);
},
);
}
}

View File

@@ -0,0 +1,23 @@
import 'dart:io';
import 'package:file_picker/file_picker.dart';
class FilePickerMethod {
Future<File?> pickFile() async {
FilePickerResult? result = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: [
'jpg',
'jpeg',
'png',
'pdf'
], // Define the allowed file types
);
if (result != null) {
return File(result.files.single.path!);
} else {
return null;
}
}
}

View File

@@ -0,0 +1,45 @@
import 'package:image_cropper/image_cropper.dart';
import 'package:image_picker/image_picker.dart';
class ImagePickerMethod {
Future<String> getImage(ImageSource imgSource) async {
final ImagePicker picker = ImagePicker();
final XFile? pickedImg = await picker.pickImage(source: imgSource);
if (pickedImg != null) {
// final File pickedFile = File(pickedImg.path);
// final int fileSize = await pickedFile.length();
// // Check if file size is less than 2 MB (2 * 1024 * 1024 bytes)
// if (fileSize > 2 * 1024 * 1024) {
// // File size is greater than 2 MB
// return ""; // Return empty string indicating image is too large
// }
final croppedImg = await ImageCropper().cropImage(
sourcePath: pickedImg.path,
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
compressFormat: ImageCompressFormat.jpg,
maxHeight: 512,
maxWidth: 512,
uiSettings: [
IOSUiSettings(
rotateButtonsHidden: true,
rotateClockwiseButtonHidden: true,
)
],
compressQuality: 100,
// cropStyle: CropStyle.circle,
aspectRatioPresets: [
CropAspectRatioPreset.square,
],
);
if (croppedImg != null) {
return croppedImg.path;
} else {
return "";
}
} else {
return "";
}
}
}

View File

@@ -0,0 +1,224 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:regroup/Utils/Common/FilePicker.dart';
import 'package:regroup/Utils/Common/ImagePicker.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
class ImageUploadBottomSheet {
// final ProfileImageController editProfileImage =
// Get.put(ProfileImageController());
showModal(
BuildContext context,
bool showFile,
Function(String) onImagePicked,
) {
return showModalBottomSheet(
isScrollControlled: true,
context: context,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(26.r),
topRight: Radius.circular(26.r),
),
),
builder: (context) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 36.w, vertical: 26.h),
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
(showFile) ? 'Select Image/File' : 'Select Image',
style: TextStyle(
color: const Color(0xff444444),
fontSize: 22.sp,
),
),
sizedBoxHeight(40.h),
showFile == true
? Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () async {
// editProfileImage.getImage(ImageSource.camera);
var result = await ImagePickerMethod()
.getImage(ImageSource.camera);
onImagePicked(result);
Get.back();
},
child: Column(
children: [
CircleAvatar(
radius: 27.r,
backgroundColor: const Color(0xFFE8C69F80),
child: Icon(
Icons.camera_alt_outlined,
size: 30.sp,
color: Colors.white,
),
),
SizedBox(
height: 6.h,
),
Text(
'Camera',
style: TextStyle(
fontSize: 13.sp,
color: const Color(0xff444444),
),
)
],
),
),
sizedBoxWidth(36.w),
GestureDetector(
onTap: () async {
var result = await ImagePickerMethod()
.getImage(ImageSource.gallery);
onImagePicked(result);
Get.back();
},
child: Column(
children: [
CircleAvatar(
radius: 27.r,
backgroundColor: const Color(0xFFE8C69F80),
child: Icon(
Icons.image_outlined,
size: 30.sp,
color: Colors.white,
),
),
SizedBox(
height: 6.h,
),
Text(
'Gallery',
style: TextStyle(
fontSize: 13.sp,
color: const Color(0xff444444),
),
)
],
),
),
sizedBoxWidth(36.w),
GestureDetector(
onTap: () async {
var result = await FilePickerMethod().pickFile();
onImagePicked(result?.path ?? "");
Get.back();
},
child: Column(
children: [
CircleAvatar(
radius: 27.r,
backgroundColor: const Color(0xFFE8C69F80),
child: Icon(
Icons.file_copy_outlined,
size: 30.sp,
color: Colors.white,
),
),
SizedBox(
height: 6.h,
),
Text(
'File',
style: TextStyle(
fontSize: 13.sp,
color: const Color(0xff444444),
fontFamily: 'Poppins'),
)
],
),
),
],
)
: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
GestureDetector(
onTap: () async {
// editProfileImage.getImage(ImageSource.camera);
var result = await ImagePickerMethod()
.getImage(ImageSource.camera);
onImagePicked(result);
Get.back();
},
child: Column(
children: [
CircleAvatar(
radius: 27.r,
backgroundColor: const Color(0xFFE8C69F80),
child: Icon(
Icons.camera_alt_outlined,
size: 30.sp,
color: Colors.white,
),
),
SizedBox(
height: 6.h,
),
Text(
'Camera',
style: TextStyle(
fontSize: 13.sp,
color: const Color(0xff444444),
),
)
],
),
),
sizedBoxWidth(36.w),
GestureDetector(
onTap: () async {
var result = await ImagePickerMethod()
.getImage(ImageSource.gallery);
onImagePicked(result);
Get.back();
},
child: Column(
children: [
CircleAvatar(
radius: 27.r,
backgroundColor: const Color(0xFFE8C69F80),
child: Icon(
Icons.image_outlined,
size: 30.sp,
color: Colors.white,
),
),
SizedBox(
height: 6.h,
),
Text(
'Gallery',
style: TextStyle(
fontSize: 13.sp,
color: const Color(0xff444444),
),
)
],
),
),
],
),
],
),
),
);
},
);
}
}

View File

@@ -0,0 +1,79 @@
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:lottie/lottie.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
class NoInternet extends StatefulWidget {
const NoInternet({super.key});
@override
State<NoInternet> createState() => _NoInternetState();
}
class _NoInternetState extends State<NoInternet> {
Future<void> checkInternet() async {
final connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.wifi ||
connectivityResult == ConnectivityResult.mobile) {
setState(() {
// _connectionStatus = connectivityResult.toString();
Get.back(result: true);
});
} else {
setState(() {
Get.snackbar("Error", "Your internet is still down!");
// _connectionStatus = connectivityResult.toString();
// print(_connectionStatus.toString());
// Get.toNamed(RouteName.nointernet);
// Navigator.pushReplacementNamed(context, "/noInternet");
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Container(
width: double.infinity,
height: 900.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Lottie.asset(
"assets/images/nointernet.json",
height: 230.h,
// width: 300.w,
// fit: BoxFit.cover
),
sizedBoxHeight(40.h),
Text(
'No Internet !',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
),
sizedBoxHeight(15.h),
Text(
'Please Check Your Internet\nConnection',
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
),
sizedBoxHeight(20.h),
CustomNextButton(
text: "Try again",
onPressed: () {
checkInternet();
})
],
),
),
),
);
}
}

View File

@@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:animations/animations.dart';
import 'package:get/get.dart';
class OpenContainerWrappers extends StatelessWidget {
const OpenContainerWrappers({
Key? key,
required this.closeBuild,
required this.openBuild,
}) : super(key: key);
final Widget closeBuild;
final dynamic openBuild;
@override
Widget build(BuildContext context) {
final brightness = Get.theme.brightness;
return OpenContainer<bool>(
closedElevation: 0,
openElevation: 0,
closedColor:
(brightness == Brightness.light) ? Colors.transparent : Colors.black,
openColor: (brightness == Brightness.light) ? Colors.white : Colors.black,
transitionDuration: const Duration(milliseconds: 500),
middleColor:
(brightness == Brightness.light) ? Colors.white : Colors.black,
closedShape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0),
),
openBuilder: (BuildContext _, VoidCallback openContainer) {
return openBuild;
},
closedBuilder: (BuildContext _, VoidCallback openContainer) {
return closeBuild;
},
transitionType: ContainerTransitionType.fade,
);
}
}

View File

@@ -0,0 +1,66 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
class ShimmerCommon extends StatelessWidget {
const ShimmerCommon({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffFFF3E4), body: _buildShimmerBody());
}
// Build shimmer effect for the body
Widget _buildShimmerBody() {
return ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: 4,
itemBuilder: (context, index) {
return SizedBox(
height: MediaQuery.of(context).size.height > 700 ? 220 : 270,
child: _buildShimmerInsightWidget(),
);
},
);
}
// Build shimmer UI for InsightWidget
Widget _buildShimmerInsightWidget() {
return Shimmer.fromColors(
baseColor: Colors.grey[300]!,
highlightColor: Colors.grey[100]!,
child: Container(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
height: 20,
color: Colors.grey[300],
),
SizedBox(height: 8),
Container(
width: double.infinity,
height: 20,
color: Colors.grey[300],
),
SizedBox(height: 8),
Container(
width: double.infinity,
height: 20,
color: Colors.grey[300],
),
SizedBox(height: 8),
Container(
width: double.infinity,
height: 20,
color: Colors.grey[300],
),
],
),
),
);
}
}

View File

@@ -0,0 +1,6 @@
class ApiUrls {
static const baseUrl = "";
static const getfaq = "${baseUrl}faq-tags";
}

View File

@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';
Widget sizedBoxHeight(double? height) {
return SizedBox(
height: height,
);
}
Widget sizedBoxWidth(double? width) {
return SizedBox(
width: width,
);
}

70
lib/Utils/Helper.dart Normal file
View File

@@ -0,0 +1,70 @@
import 'dart:developer';
import 'dart:io';
import 'dart:typed_data';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class Helper {
static Future<MultipartFile> networkImageToMultipartFile(
String imageUrl) async {
Dio dio = Dio();
Response<Uint8List> response = await dio.get<Uint8List>(imageUrl,
options: Options(responseType: ResponseType.bytes));
MultipartFile multipartFile = MultipartFile.fromBytes(
response.data!,
filename: imageUrl.substring(imageUrl.lastIndexOf("/") + 1),
);
return multipartFile;
}
static Future<MultipartFile> assetImageToMultipartFile(
String assetImagePath, String fileName) async {
ByteData assetByteData = await rootBundle.load(assetImagePath);
List<int> assetBytes = assetByteData.buffer.asUint8List();
MultipartFile file = MultipartFile.fromBytes(
assetBytes,
filename: fileName,
);
return file;
}
static Future<void> downloadImage(String image, BuildContext context) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
String? token = prefs.getString('token');
final Dio dio = Dio();
final appDir = await getApplicationDocumentsDirectory();
final String fileName = image.split('/').last;
;
final File file = File('${appDir.path}/$fileName');
try {
log(file.path);
await dio.download(image, file.path,
options: Options(headers: {"authorization": "Bearer $token"}));
// // Save image to gallery
await ImageGallerySaver.saveFile(file.path);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Image downloaded and saved to gallery successfully'),
),
);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Failed to download or save image'),
),
);
}
}
}

View File

@@ -0,0 +1,20 @@
class ResponseData<T> {
ResponseData(this.message, this.status, {this.data});
final T? data;
final String message;
final ResponseStatus status;
@override
String toString() => message;
}
enum ResponseStatus {
SUCCESS,
FAILED,
PRIVATE,
ERROR
}

7
lib/Utils/colors.dart Normal file
View File

@@ -0,0 +1,7 @@
import 'package:flutter/material.dart';
class AppColors {
static const white = Color(0xffFFFFFF);
static const black = Color(0xff0F0C0C);
}

33
lib/Utils/dialogs.dart Normal file
View File

@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:get/get.dart';
class utils {
static showToast(String? msg) {
if (msg != null && msg != "null" && msg.isNotEmpty) {
Fluttertoast.showToast(msg: msg);
}
}
static loader() {
Get.dialog(
Dialog(
elevation: 0,
backgroundColor: Colors.transparent,
child: WillPopScope(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CircularProgressIndicator(
color: Color(0xffc18948),
),
],
),
),
onWillPop: () async => false),
),
barrierDismissible: false,
);
}
}

122
lib/Utils/texts.dart Normal file
View File

@@ -0,0 +1,122 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Utils/colors.dart';
Widget text30BlackM(String text) {
return Text(
text,
style: TextStyle(
fontSize: 29.sp, color: AppColors.black, fontWeight: FontWeight.w500),
);
}
Widget text20Black(String text) {
return Text(
text,
style: TextStyle(
fontSize: 20.sp,
color: AppColors.black,
// fontWeight: FontWeight.w500
),
);
}
Widget text20Blackw600(String text) {
return Text(
text,
style: TextStyle(
fontSize: 20.sp, color: AppColors.black, fontWeight: FontWeight.w600),
);
}
Widget textA4856_20500(String text) {
return Text(
text,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 20.sp,
color: Color(0XFF3A4856),
),
);
}
Widget text272424_18(String text) {
return Text(
text,
style: TextStyle(
fontSize: 18.sp,
color: Color(0XFF272424),
),
);
}
Widget text14Black(String text) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
color: AppColors.black,
),
);
}
Widget text16White(String text, {TextAlign? textAlign}) {
return Text(
text,
textAlign: textAlign,
style: TextStyle(
fontSize: 16.sp,
color: AppColors.white,
),
);
}
Widget text16400Black(String text, {TextAlign? textAlign}) {
return Text(
text,
textAlign: textAlign,
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w400,
color: AppColors.black,
),
);
}
Widget text20White(String text, {TextAlign? textAlign}) {
return Text(
text,
textAlign: textAlign,
style: TextStyle(
fontSize: 20.sp,
color: AppColors.white,
),
);
}
Widget text14White(String text, {TextAlign? textAlign}) {
return Text(
text,
textAlign: textAlign,
style: TextStyle(
fontSize: 14.sp,
color: AppColors.white,
),
);
}
Widget contentText(String content) {
return Text(
content,
style: TextStyle(fontSize: 18.sp, color: const Color(0xff272424)),
);
}
Widget txt20Black(txt) {
return Text(
txt,
style: TextStyle(fontSize: 20.sp, color: const Color(0xff000000)),
);
}

View File

@@ -1,115 +1,167 @@
import 'package:flutter/material.dart';
import 'dart:async';
void main() {
runApp(const MyApp());
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:regroup/resources/routes/routes.dart';
import 'package:shared_preferences/shared_preferences.dart';
// void main() {
// runApp(const MyApp());
// }
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SharedPreferences prefs = await SharedPreferences.getInstance();
// GlobalVariables globalVariables = GlobalVariables();
// token = prefs.getString('token');
// await Firebase.initializeApp(
// options: DefaultFirebaseOptions.currentPlatform,
// );
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// PlatformDispatcher.instance.onError = (error, stack) {
// FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
// return true;
// };
// OnBoard = prefs.getBool("OnBoard");
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]).then((value) => runApp(const MyApp()));
}
class MyApp extends StatelessWidget {
class MyApp extends StatefulWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
State<MyApp> createState() => _MyAppState();
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
var _connectionStatus = ConnectivityResult.values.toString();
late StreamSubscription<List<ConnectivityResult>> subscription;
Connectivity connectivity = Connectivity();
@override
State<MyHomePage> createState() => _MyHomePageState();
}
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
connectivity = Connectivity();
checkInternet();
// if (Platform.isAndroid) {
// _getStoragePermission();
// }
// _getStoragePermission();
subscription = connectivity.onConnectivityChanged
.listen((List<ConnectivityResult> result) {
_connectionStatus = result.toString();
if (result == ConnectivityResult.wifi ||
result == ConnectivityResult.mobile) {
setState(() {
_connectionStatus = result.toString();
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
Get.back(result: true);
});
} else {
setState(() {
_connectionStatus = result.toString();
Get.toNamed(RouteName.nointernet);
});
}
});
// print(_connectionStatus);
}
Future<void> _getStoragePermission() async {
DeviceInfoPlugin plugin = DeviceInfoPlugin();
AndroidDeviceInfo android = await plugin.androidInfo;
if (android.version.sdkInt < 33) {
if (await Permission.storage.request().isGranted) {
// setState(() {
// permissionGranted = true;
// });
} else if (await Permission.storage.request().isPermanentlyDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
}
// else if (await Permission.audio.request().isDenied) {
// // setState(() {
// // permissionGranted = false;
// // });
// }
} else {
if (await Permission.photos.request().isGranted) {
// await utils.showToast("Permission granted.");
// setState(() {
// permissionGranted = true;
// });
} else if (await Permission.photos.request().isPermanentlyDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
} else if (await Permission.photos.request().isDenied) {
await openAppSettings();
await utils.showToast("Permission denied.");
// setState(() {
// permissionGranted = false;
// });
}
}
}
Future<void> checkInternet() async {
final connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.wifi ||
connectivityResult == ConnectivityResult.mobile) {
setState(() {
_connectionStatus = connectivityResult.toString();
});
} else {
setState(() {
_connectionStatus = connectivityResult.toString();
print(_connectionStatus.toString());
Get.toNamed(RouteName.nointernet);
// Navigator.pushReplacementNamed(context, "/noInternet");
});
}
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
subscription.cancel();
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
return
ScreenUtilInit(
builder: (BuildContext context, Widget? child) => GetMaterialApp(
title: 'Regroup',
theme: ThemeData(
primarySwatch:
// createPrimarySwatch(Color(0xFF737373)),
Colors.grey,
fontFamily: 'Cambria',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.splashScreen,
//initialRoute: RouteName.mainScreen,
getPages: AppRoutes.appRoutes(),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
designSize: const Size(390, 844),
);
}
}

View File

@@ -0,0 +1,6 @@
class RouteName {
static const String splashScreen = '/';
static const String loginScreen = '/loginScreen';
static const String nointernet = '/nointernet';
}

View File

@@ -0,0 +1,19 @@
import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:regroup/Utils/Common/NoInternet.dart';
import 'package:regroup/resources/routes/route_name.dart';
class AppRoutes {
static appRoutes() => [
GetPage(
name: RouteName.nointernet,
page: () => const NoInternet(),
),
// GetPage(
// name: RouteName.splashScreen,
// page: () =>
// const
// SplashScreen(),
// ),
];
}

View File

@@ -1,14 +1,38 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
animations:
dependency: "direct main"
description:
name: animations
sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
url: "https://pub.dev"
source: hosted
version: "2.0.11"
archive:
dependency: transitive
description:
name: archive
sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b"
url: "https://pub.dev"
source: hosted
version: "3.6.0"
args:
dependency: transitive
description:
name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
async:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
@@ -21,10 +45,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
clock:
dependency: transitive
description:
@@ -37,10 +61,42 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.0"
connectivity_plus:
dependency: "direct main"
description:
name: connectivity_plus
sha256: db7a4e143dc72cc3cb2044ef9b052a7ebfe729513e6a82943bc3526f784365b8
url: "https://pub.dev"
source: hosted
version: "6.0.3"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
sha256: b6a56efe1e6675be240de39107281d4034b64ac23438026355b4234042a35adb
url: "https://pub.dev"
source: hosted
version: "2.0.0"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
url: "https://pub.dev"
source: hosted
version: "0.3.3+8"
crypto:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.3"
cupertino_icons:
dependency: "direct main"
description:
@@ -49,6 +105,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
dbus:
dependency: transitive
description:
name: dbus
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
sha256: "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110"
url: "https://pub.dev"
source: hosted
version: "9.1.2"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64
url: "https://pub.dev"
source: hosted
version: "7.0.0"
dio:
dependency: "direct main"
description:
name: dio
sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5"
url: "https://pub.dev"
source: hosted
version: "5.4.3+1"
fake_async:
dependency: transitive
description:
@@ -57,6 +145,62 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
file:
dependency: transitive
description:
name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03
url: "https://pub.dev"
source: hosted
version: "8.0.0+1"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492"
url: "https://pub.dev"
source: hosted
version: "0.9.2+1"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385
url: "https://pub.dev"
source: hosted
version: "0.9.4"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
url: "https://pub.dev"
source: hosted
version: "2.6.2"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0
url: "https://pub.dev"
source: hosted
version: "0.9.3+1"
flutter:
dependency: "direct main"
description: flutter
@@ -70,19 +214,176 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
url: "https://pub.dev"
source: hosted
version: "2.0.19"
flutter_screenutil:
dependency: "direct main"
description:
name: flutter_screenutil
sha256: b372c35a772a1dc84142a3b9c5ee89a390834bd258e5e6a450d9b975b985d1c9
url: "https://pub.dev"
source: hosted
version: "5.9.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
url: "https://pub.dev"
source: hosted
version: "2.0.10+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
fluttertoast:
dependency: "direct main"
description:
name: fluttertoast
sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66"
url: "https://pub.dev"
source: hosted
version: "8.2.5"
get:
dependency: "direct main"
description:
name: get
sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e
url: "https://pub.dev"
source: hosted
version: "4.6.6"
http:
dependency: transitive
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
url: "https://pub.dev"
source: hosted
version: "1.2.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image_cropper:
dependency: "direct main"
description:
name: image_cropper
sha256: db779a8b620cd509874cb0e2a8bdc8649177f8f5ca46c13273ceaffe071e3f4a
url: "https://pub.dev"
source: hosted
version: "6.0.0"
image_cropper_for_web:
dependency: transitive
description:
name: image_cropper_for_web
sha256: ba67de40a98b3294084eed0b025b557cb594356e1171c9a830b340527dbd5e5f
url: "https://pub.dev"
source: hosted
version: "4.0.0"
image_cropper_platform_interface:
dependency: transitive
description:
name: image_cropper_platform_interface
sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e
url: "https://pub.dev"
source: hosted
version: "5.0.0"
image_gallery_saver:
dependency: "direct main"
description:
name: image_gallery_saver
sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8"
url: "https://pub.dev"
source: hosted
version: "1.0.8"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58"
url: "https://pub.dev"
source: hosted
version: "0.8.9+6"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3
url: "https://pub.dev"
source: hosted
version: "3.0.2"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3
url: "https://pub.dev"
source: hosted
version: "0.8.9+1"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b
url: "https://pub.dev"
source: hosted
version: "2.9.3"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.7.1"
lints:
dependency: transitive
description:
@@ -91,38 +392,262 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lottie:
dependency: "direct main"
description:
name: lottie
sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
matcher:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.10.0"
mime:
dependency: transitive
description:
name: mime
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
url: "https://pub.dev"
source: hosted
version: "1.0.5"
nm:
dependency: transitive
description:
name: nm
sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
path:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.8.3"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.3"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
url: "https://pub.dev"
source: hosted
version: "2.2.4"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
url: "https://pub.dev"
source: hosted
version: "11.3.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5"
url: "https://pub.dev"
source: hosted
version: "12.0.6"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662
url: "https://pub.dev"
source: hosted
version: "9.4.4"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.0.2"
platform:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
remove_emoji_input_formatter:
dependency: "direct main"
description:
name: remove_emoji_input_formatter
sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f"
url: "https://pub.dev"
source: hosted
version: "0.0.1+1"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
url: "https://pub.dev"
source: hosted
version: "2.2.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c"
url: "https://pub.dev"
source: hosted
version: "2.3.5"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
shimmer:
dependency: "direct main"
description:
name: shimmer
sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
sky_engine:
dependency: transitive
description: flutter
@@ -132,26 +657,26 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
@@ -172,10 +697,42 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.6.1"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.2"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_math:
dependency: transitive
description:
@@ -184,5 +741,46 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
win32:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
url: "https://pub.dev"
source: hosted
version: "1.0.4"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
sdks:
dart: ">=2.19.6 <3.0.0"
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"

View File

@@ -35,6 +35,24 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
get: ^4.6.6
flutter_screenutil: ^5.9.1
fluttertoast: ^8.2.5
dio: ^5.4.3+1
image_gallery_saver: ^2.0.3
path_provider: ^2.1.3
shared_preferences: ^2.2.3
flutter_svg: ^2.0.10+1
remove_emoji_input_formatter: ^0.0.1+1
file_picker: ^8.0.0+1
image_cropper: ^6.0.0
image_picker: ^1.0.8
lottie: ^3.1.2
connectivity_plus:
animations: ^2.0.11
shimmer: ^3.0.0
device_info_plus: ^9.1.2
permission_handler: ^11.3.1
dev_dependencies:
flutter_test: