Compare commits
No commits in common. "9786bcdfceb989fc0c184a96650ab7fa7a2833bf" and "4321fbafaad5334e5e5a061c9cfba772d20e9a93" have entirely different histories.
9786bcdfce
...
4321fbafaa
|
|
@ -54,7 +54,7 @@ android {
|
||||||
applicationId "com.Xperience.FaucetHub"
|
applicationId "com.Xperience.FaucetHub"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 19
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 1.4 KiB |
|
|
@ -5,9 +5,7 @@ import 'package:http/http.dart' as http;
|
||||||
import 'DebugHelper.dart';
|
import 'DebugHelper.dart';
|
||||||
|
|
||||||
class DataManager{
|
class DataManager{
|
||||||
static int ClientVersion = 2;
|
static const String API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/api/";
|
||||||
|
|
||||||
static const String API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/api/v2/";
|
|
||||||
static Map<String,String> Settings = {};
|
static Map<String,String> Settings = {};
|
||||||
|
|
||||||
static List<dynamic> AllGames = [];
|
static List<dynamic> AllGames = [];
|
||||||
|
|
@ -31,18 +29,6 @@ class DataManager{
|
||||||
GamesEarnings = CryptoEarnings = {};
|
GamesEarnings = CryptoEarnings = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<int> GetVersion() async{
|
|
||||||
var response = (await http.post(Uri.parse('${API_ENDPOINT}get_version.php')));
|
|
||||||
int v = -1;
|
|
||||||
try{
|
|
||||||
v = int.parse(response.body.toString());
|
|
||||||
}catch(e){
|
|
||||||
v=-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<bool> Init() async{
|
static Future<bool> Init() async{
|
||||||
bool isSettingsDone = await GetSettings();
|
bool isSettingsDone = await GetSettings();
|
||||||
bool isGamesDone = await GetGames();
|
bool isGamesDone = await GetGames();
|
||||||
|
|
@ -104,14 +90,14 @@ class DataManager{
|
||||||
Debug.Log("err044 : $UserJson");
|
Debug.Log("err044 : $UserJson");
|
||||||
LinkedGamesJson = [];
|
LinkedGamesJson = [];
|
||||||
NonLinkedGamesJson = [];
|
NonLinkedGamesJson = [];
|
||||||
if (UserJson['linked_games']
|
if (UserJson['linkedGames']
|
||||||
.toString()
|
.toString()
|
||||||
.length < 3) {
|
.length < 3) {
|
||||||
NonLinkedGamesJson = AllGames;
|
NonLinkedGamesJson = AllGames;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<Map<String, dynamic>> linkedGames = jsonDecode(
|
List<Map<String, dynamic>> linkedGames = jsonDecode(
|
||||||
UserJson['linked_games']).cast<Map<String, dynamic>>();
|
UserJson['linkedGames']).cast<Map<String, dynamic>>();
|
||||||
|
|
||||||
AllGames.forEach((element) {
|
AllGames.forEach((element) {
|
||||||
bool foundLink = false;
|
bool foundLink = false;
|
||||||
|
|
@ -325,31 +311,6 @@ class DataManager{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<int> Review() async{
|
|
||||||
var loginResponse = null;
|
|
||||||
try {
|
|
||||||
loginResponse = (await http.post(
|
|
||||||
Uri.parse('${DataManager.API_ENDPOINT}review.php'),
|
|
||||||
body: <String, String>{
|
|
||||||
"username": username,
|
|
||||||
"password": password
|
|
||||||
}));
|
|
||||||
Debug.LogResponse(loginResponse.body.toString(),src: "review.php");
|
|
||||||
|
|
||||||
try{
|
|
||||||
DataManager.UserJson = jsonDecode(loginResponse.body.toString());
|
|
||||||
await DataManager.GetGamesProgress();
|
|
||||||
return 0;
|
|
||||||
}catch(e){
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
Debug.LogError("Error while review $e");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static Future<List<dynamic>> GetWithdrawalHistory() async{
|
static Future<List<dynamic>> GetWithdrawalHistory() async{
|
||||||
Map<String,String> body = <String, String>{
|
Map<String,String> body = <String, String>{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ class Debug{
|
||||||
if(!enableLogging){return;}
|
if(!enableLogging){return;}
|
||||||
if(!enableErrorLoggin) {return;}
|
if(!enableErrorLoggin) {return;}
|
||||||
print('\x1B[31m$msg\x1B[0m');
|
print('\x1B[31m$msg\x1B[0m');
|
||||||
print(StackTrace.current);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Log(Object? msg){
|
static void Log(Object? msg){
|
||||||
|
|
|
||||||
|
|
@ -120,8 +120,6 @@ class LoginManager {
|
||||||
prefs.setString("username", username);
|
prefs.setString("username", username);
|
||||||
prefs.setString("password", username);
|
prefs.setString("password", username);
|
||||||
prefs.setBool("googleLogin", true);
|
prefs.setBool("googleLogin", true);
|
||||||
DataManager.username = username;
|
|
||||||
DataManager.password = username;
|
|
||||||
return 0;
|
return 0;
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return 5;
|
return 5;
|
||||||
|
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
||||||
import 'package:external_app_launcher/external_app_launcher.dart';
|
|
||||||
import 'package:fhub/src/CustomWidgets.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class UpdatePage extends StatefulWidget {
|
|
||||||
const UpdatePage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<UpdatePage> createState() => _UpdatePageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _UpdatePageState extends State<UpdatePage> {
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
|
||||||
kickstartAnimations();
|
|
||||||
}
|
|
||||||
|
|
||||||
void kickstartAnimations() async {
|
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
op1 = 0.5;
|
|
||||||
op2 = 0.5;
|
|
||||||
op3 = 0.5;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Colors.black,
|
|
||||||
body: CustomBody(
|
|
||||||
context: context, onAnimEnd: (){setState(() {});},
|
|
||||||
child: SafeArea(
|
|
||||||
child: Center(
|
|
||||||
child: GlassCard(child: Container(width: 300,height: 300, child: Padding(
|
|
||||||
padding: const EdgeInsets.all(38.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
GradientText(text: "New Update", gradient: LinearGradient(colors: [Colors.white.withOpacity(0.7), Colors.white.withOpacity(0.2),]),style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),),
|
|
||||||
Icon(Icons.upcoming_outlined,size: 70,),
|
|
||||||
GlassButton(onTap: () async{
|
|
||||||
await LaunchApp.openApp(
|
|
||||||
androidPackageName: 'com.Xperience.FaucetHub',
|
|
||||||
// openStore: false
|
|
||||||
);
|
|
||||||
}, child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(Icons.install_mobile,size: 20,),
|
|
||||||
SizedBox(width: 20,),
|
|
||||||
Text("Update"),
|
|
||||||
SizedBox(width: 15,)
|
|
||||||
],
|
|
||||||
), width: 200,height: 40,color: Colors.greenAccent)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class MaintaincePage extends StatefulWidget {
|
|
||||||
const MaintaincePage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MaintaincePage> createState() => _MaintaincePage();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MaintaincePage extends State<MaintaincePage> {
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
|
||||||
kickstartAnimations();
|
|
||||||
}
|
|
||||||
|
|
||||||
void kickstartAnimations() async {
|
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
op1 = 0.5;
|
|
||||||
op2 = 0.5;
|
|
||||||
op3 = 0.5;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Colors.black,
|
|
||||||
body: CustomBody(
|
|
||||||
context: context, onAnimEnd: (){setState(() {});},
|
|
||||||
child: SafeArea(
|
|
||||||
child: Center(
|
|
||||||
child: GlassCard(child: Container(width: 300,height: 300, child: Padding(
|
|
||||||
padding: const EdgeInsets.all(38.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
GradientText(text: "Under Maintaince", gradient: LinearGradient(colors: [Colors.white.withOpacity(0.7), Colors.white.withOpacity(0.2),]),style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),),
|
|
||||||
Icon(Icons.construction,size: 60,),
|
|
||||||
Text("This app is currently under maintaince, Please check back shortly",textAlign: TextAlign.center,),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:external_app_launcher/external_app_launcher.dart';
|
import 'package:external_app_launcher/external_app_launcher.dart';
|
||||||
import 'package:fhub/backend/DataManager.dart';
|
import 'package:fhub/backend/DataManager.dart';
|
||||||
import 'package:fhub/backend/Dialogs.dart';
|
import 'package:fhub/backend/Dialogs.dart';
|
||||||
|
|
@ -94,10 +93,7 @@ class _GameInfoPageState extends State<GameInfoPage> with WidgetsBindingObserver
|
||||||
width: 120,
|
width: 120,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: CachedNetworkImage(imageUrl: widget.gameJson['icon'],)
|
child: Image.network(widget.gameJson['icon']))),
|
||||||
|
|
||||||
// child: Image.network(widget.gameJson['icon'])
|
|
||||||
)),
|
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
|
|
|
||||||
345
lib/home.dart
|
|
@ -1,12 +1,8 @@
|
||||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
||||||
import 'package:external_app_launcher/external_app_launcher.dart';
|
|
||||||
import 'package:fhub/backend/DataManager.dart';
|
import 'package:fhub/backend/DataManager.dart';
|
||||||
import 'package:fhub/backend/DebugHelper.dart';
|
import 'package:fhub/backend/DebugHelper.dart';
|
||||||
import 'package:fhub/backend/Dialogs.dart';
|
import 'package:fhub/backend/Dialogs.dart';
|
||||||
import 'package:fhub/gameInfo.dart';
|
import 'package:fhub/gameInfo.dart';
|
||||||
import 'package:fhub/off_screen.dart';
|
|
||||||
import 'package:fhub/src/CustomWidgets.dart';
|
import 'package:fhub/src/CustomWidgets.dart';
|
||||||
import 'package:fhub/wd_history.dart';
|
import 'package:fhub/wd_history.dart';
|
||||||
import 'package:fhub/wd_portal.dart';
|
import 'package:fhub/wd_portal.dart';
|
||||||
|
|
@ -14,7 +10,6 @@ import 'package:fhub/welcome.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import 'backend/helpers.dart';
|
import 'backend/helpers.dart';
|
||||||
|
|
@ -36,24 +31,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
TxtCoinbaseAddress.text = DataManager.UserJson['wd_address'] ?? "";
|
TxtCoinbaseAddress.text = DataManager.UserJson['wd_address'] ?? "";
|
||||||
|
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
subscription = Connectivity()
|
|
||||||
.onConnectivityChanged
|
|
||||||
.listen((ConnectivityResult result) async {
|
|
||||||
// Got a new connectivity status!
|
|
||||||
try {
|
|
||||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
|
||||||
Debug.Log(connectivityResult);
|
|
||||||
if (connectivityResult != ConnectivityResult.mobile &&
|
|
||||||
connectivityResult != ConnectivityResult.mobile &&
|
|
||||||
connectivityResult != ConnectivityResult.ethernet) {
|
|
||||||
Navigator.of(context).pushReplacement(
|
|
||||||
MaterialPageRoute(builder: (_) => OfflinePage(id: 0)));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} catch (e) {}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -62,7 +39,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
subscription.cancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -71,17 +47,20 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
super.didChangeAppLifecycleState(state);
|
super.didChangeAppLifecycleState(state);
|
||||||
// Debug.Log(state);
|
// Debug.Log(state);
|
||||||
|
|
||||||
if (state == AppLifecycleState.resumed) {
|
if(state == AppLifecycleState.resumed){
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Refresh() async {
|
void Refresh()async{
|
||||||
await DataManager.GrabOnce();
|
await DataManager.GrabOnce();
|
||||||
|
|
||||||
setState(() {});
|
setState(() {
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void kickstartAnimations() async {
|
void kickstartAnimations() async {
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
|
@ -94,8 +73,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
|
|
||||||
int selectedPageId = 0;
|
int selectedPageId = 0;
|
||||||
String TitleText = "Home";
|
String TitleText = "Home";
|
||||||
var subscription;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final screenHeight = MediaQuery.of(context).size.height;
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
|
|
@ -113,12 +90,12 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
},
|
},
|
||||||
bottomNav: [
|
bottomNav: [
|
||||||
BottomNavBarItem(
|
BottomNavBarItem(
|
||||||
icon: Icons.people,
|
icon: Icons.home,
|
||||||
active: selectedPageId == 4,
|
active: selectedPageId == 0,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
TitleText = "Share";
|
TitleText = "Home";
|
||||||
selectedPageId = 4;
|
selectedPageId = 0;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
@ -131,16 +108,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
selectedPageId = 3;
|
selectedPageId = 3;
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
BottomNavBarItem(
|
|
||||||
icon: Icons.home,
|
|
||||||
active: selectedPageId == 0,
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
TitleText = "Home";
|
|
||||||
selectedPageId = 0;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
BottomNavBarItem(
|
BottomNavBarItem(
|
||||||
icon: Icons.wallet,
|
icon: Icons.wallet,
|
||||||
active: selectedPageId == 1,
|
active: selectedPageId == 1,
|
||||||
|
|
@ -203,8 +170,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
return games();
|
return games();
|
||||||
case 2:
|
case 2:
|
||||||
return settings();
|
return settings();
|
||||||
case 4:
|
|
||||||
return share();
|
|
||||||
default:
|
default:
|
||||||
return home();
|
return home();
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +186,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
selectedPageId = 1;
|
selectedPageId = 1;
|
||||||
TitleText = "Wallet";
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: TotalEarningsCard()),
|
child: TotalEarningsCard()),
|
||||||
|
|
@ -324,9 +288,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(15.0),
|
padding: const EdgeInsets.all(15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Install a game from the list below and Link it to FaucetHub(FH) to Start Earning!",
|
"Install a game from the list below and Link it to FaucetHub(FH) to Start Earning!",style: TextStyle(color: Colors.blue.withGreen(150).withRed(100)),
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.blue.withGreen(150).withRed(100)),
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
@ -353,13 +315,10 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
Widget GameCard({required int index, required List<dynamic> list}) {
|
Widget GameCard({required int index, required List<dynamic> list}) {
|
||||||
return GlassCard(
|
return GlassCard(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
await Navigator.of(context).push(MaterialPageRoute(
|
Navigator.of(context).push(MaterialPageRoute(
|
||||||
builder: (BuildContext context) =>
|
builder: (BuildContext context) =>
|
||||||
GameInfoPage(gameJson: list[index])));
|
GameInfoPage(gameJson: list[index])));
|
||||||
|
|
||||||
await DataManager.GrabOnce();
|
|
||||||
setState(() {});
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(12),
|
padding: EdgeInsets.all(12),
|
||||||
|
|
@ -377,11 +336,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
width: 50,
|
width: 50,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: CachedNetworkImage(
|
child: Image.network(list[index]['icon']))),
|
||||||
imageUrl: list[index]['icon'],
|
|
||||||
)
|
|
||||||
// child: Image.network(list[index]['icon'])
|
|
||||||
)),
|
|
||||||
Icon(Helpers.GetIconForCrypto(list[index]['coin']))
|
Icon(Helpers.GetIconForCrypto(list[index]['coin']))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -430,56 +385,36 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
),
|
),
|
||||||
Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ',
|
Text('~ \$${DataManager.currentEarnings.toStringAsFixed(2)} ',
|
||||||
style: TextStyle(fontSize: 50)),
|
style: TextStyle(fontSize: 50)),
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
SizedBox(height: 20,),
|
||||||
),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
GlassButton(
|
GlassButton(onTap: (){
|
||||||
onTap: () {
|
if(DataManager.currentEarnings <= 1){
|
||||||
if (DataManager.currentEarnings <= 1) {
|
Dialogs.showAlertDialog(context, "Not Enough To Withdraw", "You need atleast \$1 to initiate a withdraw.");
|
||||||
Dialogs.showAlertDialog(
|
|
||||||
context,
|
|
||||||
"Not Enough To Withdraw",
|
|
||||||
"You need atleast \$1 to initiate a withdraw.");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DataManager.UserJson['wd_address']
|
if(!DataManager.UserJson['wd_address'].toString().contains("@")){
|
||||||
.toString()
|
Dialogs.showAlertDialog(context, "Invalid Withdrawal Address", "Please enter a valid email address for coinbase address. Your earnings will be sent to that address via coinbase");
|
||||||
.contains("@")) {
|
|
||||||
Dialogs.showAlertDialog(
|
|
||||||
context,
|
|
||||||
"Invalid Withdrawal Address",
|
|
||||||
"Please enter a valid email address for coinbase address. Your earnings will be sent to that address via coinbase");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.of(context).push(wdRoute);
|
Navigator.of(context).push(wdRoute);
|
||||||
},
|
}, child: Text("Withdraw"),height: 40, width: 200, color: Colors.greenAccent),
|
||||||
child: Text("Withdraw"),
|
GlassButton(onTap: (){
|
||||||
height: 40,
|
|
||||||
width: 200,
|
|
||||||
color: Colors.greenAccent),
|
|
||||||
GlassButton(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.of(context).push(MaterialPageRoute(
|
Navigator.of(context).push(MaterialPageRoute(
|
||||||
builder: (BuildContext context) =>
|
builder: (BuildContext context) =>
|
||||||
WithdrawalHistoryPage()));
|
WithdrawalHistoryPage()));
|
||||||
},
|
}, child: Icon(Icons.history), width: 60, height: 40)
|
||||||
child: Icon(Icons.history),
|
|
||||||
width: 60,
|
|
||||||
height: 40)
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(DataManager.currentEarnings <= 0)
|
(DataManager.currentEarnings <=0) ? Container() : Column(children: [
|
||||||
? Container()
|
|
||||||
: Column(children: [
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
|
|
@ -492,8 +427,8 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
),
|
),
|
||||||
GlassCard(
|
GlassCard(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding:
|
||||||
vertical: 8.0, horizontal: 15),
|
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 15),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
|
|
@ -544,10 +479,9 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
itemCount: DataManager.GamesEarnings.length,
|
itemCount: DataManager.GamesEarnings.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
String gameName = DataManager.GamesEarnings.keys
|
String gameName =
|
||||||
.elementAt(index);
|
DataManager.GamesEarnings.keys.elementAt(index);
|
||||||
dynamic GameJson =
|
dynamic GameJson = Helpers.GetGameFromCode(gameName);
|
||||||
Helpers.GetGameFromCode(gameName);
|
|
||||||
if (GameJson == null) {
|
if (GameJson == null) {
|
||||||
Debug.LogError(
|
Debug.LogError(
|
||||||
("Error getting game json from ${gameName}. returned:\n$GameJson"));
|
("Error getting game json from ${gameName}. returned:\n$GameJson"));
|
||||||
|
|
@ -571,9 +505,8 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
itemCount: DataManager.CryptoEarnings.length,
|
itemCount: DataManager.CryptoEarnings.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return WalletCurrencyListItem(DataManager
|
return WalletCurrencyListItem(
|
||||||
.CryptoEarnings.keys
|
DataManager.CryptoEarnings.keys.elementAt(index));
|
||||||
.elementAt(index));
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
@ -584,136 +517,6 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditingController TxtRefId = TextEditingController();
|
|
||||||
|
|
||||||
Widget share() {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.all(20),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
GlassCard(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.all(10),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text("Referral Program", style: TextStyle(fontSize: 18)),
|
|
||||||
SizedBox(width: 10,),
|
|
||||||
InkWell(child: Container(padding: EdgeInsets.all(5),child: Icon(Icons.help),),
|
|
||||||
onTap: (){
|
|
||||||
Dialogs.showAlertDialog(context, "Referral Program", "Share your Referral ID among your friends.\nFor each submission of your Referral ID, You'll receive a Reward!");
|
|
||||||
},)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
// Text("Earn 0.00000500 ETH for sharing with each friend."),//${DataManager.Settings['ref_reward']}
|
|
||||||
Text("Earn"),
|
|
||||||
SizedBox(height: 5,),
|
|
||||||
Text("0.00000100 BTC", style: TextStyle(fontWeight: FontWeight.bold,color: Colors.greenAccent,fontSize: 16)),
|
|
||||||
Text("For Sharing with each Friend"),
|
|
||||||
|
|
||||||
SizedBox(height: 30,),
|
|
||||||
Text("Your Referral ID"),
|
|
||||||
InkWell(
|
|
||||||
onTap: (){
|
|
||||||
Share.share('Join this platform with my referral ${DataManager.UserJson['id']}\nhttps://play.google.com/store/apps/details?id=com.Xperience.FaucetHub');
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(DataManager.UserJson['id'].toString(),style: TextStyle(fontSize: 50,fontWeight: FontWeight.bold),),
|
|
||||||
SizedBox(width: 15,),
|
|
||||||
Icon(Icons.share,size: 40)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
GlassButton(onTap: (){
|
|
||||||
if(DataManager.UserJson["refer"] != "0"){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AlertDialog alert = AlertDialog(
|
|
||||||
backgroundColor: Color(0xFF1F1F1F),
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(40)),
|
|
||||||
title: Text("Enter a Referral",textAlign: TextAlign.center,),
|
|
||||||
content: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Text("Enter your friends Referral ID",textAlign: TextAlign.center,),
|
|
||||||
TextField(controller: refController,)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
child: Text("Submit"),
|
|
||||||
onPressed: () async{
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
Dialogs.waiting();
|
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
|
||||||
Dialogs.hide();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
child: Text("Cancel"),
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
showDialog(context: context, builder: (BuildContext context){return alert;});
|
|
||||||
}, child: Text((DataManager.UserJson["refer"] == "0") ? "Use Referral" : "Already Reffered to ${DataManager.UserJson["refer"]}"), width: 200,height: 40, color: Colors.greenAccent),
|
|
||||||
SizedBox(height: 10,)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
SizedBox(height: 20,),
|
|
||||||
InkWell(
|
|
||||||
onTap: () async{
|
|
||||||
|
|
||||||
await LaunchApp.openApp(
|
|
||||||
androidPackageName: 'https://play.google.com/store/apps/details?id=com.Xperience.FaucetHub',
|
|
||||||
// openStore: false
|
|
||||||
);
|
|
||||||
await DataManager.Review();
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: GlassCard(child: Container(padding: EdgeInsets.all(10),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text("Review on Playstore", style: TextStyle(fontSize: 18)),
|
|
||||||
SizedBox(width: 10,),
|
|
||||||
Container(padding: EdgeInsets.all(5),child: Icon(Icons.star)),
|
|
||||||
Text("5"),
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
(DataManager.UserJson["review"] == "0") ? Text("Get 0.00000300 BTC", style: TextStyle(color: Colors.greenAccent, fontWeight: FontWeight.bold)) : Container()
|
|
||||||
],
|
|
||||||
),)),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
TextEditingController refController = TextEditingController();
|
|
||||||
|
|
||||||
Widget WalletGameListItem(dynamic GameJson, double amount) {
|
Widget WalletGameListItem(dynamic GameJson, double amount) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(3.0),
|
padding: const EdgeInsets.all(3.0),
|
||||||
|
|
@ -772,84 +575,56 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditingController TxtCoinbaseAddress = TextEditingController();
|
TextEditingController TxtCoinbaseAddress = TextEditingController();
|
||||||
Widget settings() {
|
Widget settings() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
GlassCard(
|
GlassCard(child: AnimatedSize(
|
||||||
child: AnimatedSize(
|
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
child: Padding(
|
child: Padding(padding: EdgeInsets.all(15), child: Column(
|
||||||
padding: EdgeInsets.all(15),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text("Coinbase Address"),
|
Text("Coinbase Address"),
|
||||||
InkWell(
|
InkWell(onTap: (){Dialogs.ShowCoinbaseDialog(context);},child: Icon(Icons.help))
|
||||||
onTap: () {
|
|
||||||
Dialogs.ShowCoinbaseDialog(context);
|
|
||||||
},
|
|
||||||
child: Icon(Icons.help))
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TextField(
|
TextField(controller: TxtCoinbaseAddress, onChanged: (e){setState(() {
|
||||||
controller: TxtCoinbaseAddress,
|
|
||||||
onChanged: (e) {
|
});},),
|
||||||
setState(() {});
|
(TxtCoinbaseAddress.text != (DataManager.UserJson['wd_address'] ?? "") )? Container(padding: EdgeInsets.all(10), child: GlassButton(onTap: () async{
|
||||||
},
|
String response = await DataManager.SetWdAddress(TxtCoinbaseAddress.text);
|
||||||
),
|
bool success = response == TxtCoinbaseAddress.text;
|
||||||
(TxtCoinbaseAddress.text !=
|
|
||||||
(DataManager.UserJson['wd_address'] ?? ""))
|
|
||||||
? Container(
|
|
||||||
padding: EdgeInsets.all(10),
|
|
||||||
child: GlassButton(
|
|
||||||
onTap: () async {
|
|
||||||
String response = await DataManager.SetWdAddress(
|
|
||||||
TxtCoinbaseAddress.text);
|
|
||||||
bool success =
|
|
||||||
response == TxtCoinbaseAddress.text;
|
|
||||||
// DataManager.UserJson['wd_address'] = TxtCoinbaseAddress.text;
|
// DataManager.UserJson['wd_address'] = TxtCoinbaseAddress.text;
|
||||||
if (!success) {
|
if(!success){
|
||||||
Dialogs.showAlertDialog(context,
|
Dialogs.showAlertDialog(context, "Error saving Coinbase Address", response);
|
||||||
"Error saving Coinbase Address", response);
|
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {
|
||||||
},
|
|
||||||
child: Text("Save"),
|
});
|
||||||
width: 250),
|
}, child: Text("Save"), width: 250),) : Container()
|
||||||
)
|
|
||||||
: Container()
|
|
||||||
],
|
],
|
||||||
),
|
),),
|
||||||
),
|
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(height: 10,),
|
||||||
height: 10,
|
|
||||||
),
|
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: ()async{
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
prefs.clear();
|
prefs.clear();
|
||||||
|
|
||||||
Navigator.of(context).pushAndRemoveUntil(
|
Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) =>
|
||||||
MaterialPageRoute(builder: (context) => MyHomePage()),
|
MyHomePage()), (Route<dynamic> route) => false);
|
||||||
(Route<dynamic> route) => false);
|
|
||||||
DataManager.Reset();
|
DataManager.Reset();
|
||||||
},
|
},
|
||||||
child: GlassCard(
|
child: GlassCard(child: Padding(
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(15.0),
|
padding: const EdgeInsets.all(15.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.logout),
|
Icon(Icons.logout),
|
||||||
SizedBox(
|
SizedBox(width: 10,),
|
||||||
width: 10,
|
|
||||||
),
|
|
||||||
Text("Signout"),
|
Text("Signout"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
@ -865,9 +640,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
{required String gameName,
|
{required String gameName,
|
||||||
required String coin,
|
required String coin,
|
||||||
required List<Widget> challengesInfo}) {
|
required List<Widget> challengesInfo}) {
|
||||||
return Padding(
|
return GlassCard(
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: GlassCard(
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: screenWidth * 0.8,
|
width: screenWidth * 0.8,
|
||||||
padding: EdgeInsets.all(15),
|
padding: EdgeInsets.all(15),
|
||||||
|
|
@ -877,10 +650,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
children: [
|
children: [
|
||||||
Text(gameName, style: TextStyle(fontSize: 16)),
|
Text(gameName, style: TextStyle(fontSize: 16)),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [Icon(Helpers.GetIconForCrypto(coin)), Text(" $coin")],
|
||||||
Icon(Helpers.GetIconForCrypto(coin)),
|
|
||||||
Text(" $coin")
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -891,8 +661,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
|
||||||
children: challengesInfo,
|
children: challengesInfo,
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
)),
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget ChallengeProgress(dynamic ChallengeData) {
|
Widget ChallengeProgress(dynamic ChallengeData) {
|
||||||
|
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
||||||
import 'package:external_app_launcher/external_app_launcher.dart';
|
|
||||||
import 'package:fhub/backend/DebugHelper.dart';
|
|
||||||
import 'package:fhub/home.dart';
|
|
||||||
import 'package:fhub/src/CustomWidgets.dart';
|
|
||||||
import 'package:fhub/welcome.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class OfflinePage extends StatefulWidget {
|
|
||||||
OfflinePage({super.key,required this.id});
|
|
||||||
int id=0;
|
|
||||||
@override
|
|
||||||
State<OfflinePage> createState() => _OfflinePageState();
|
|
||||||
}
|
|
||||||
var subscription;
|
|
||||||
class _OfflinePageState extends State<OfflinePage> {
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
|
||||||
|
|
||||||
kickstartAnimations();
|
|
||||||
|
|
||||||
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) async{
|
|
||||||
// Got a new connectivity status!
|
|
||||||
try{
|
|
||||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
|
||||||
Debug.Log(connectivityResult);
|
|
||||||
if(connectivityResult == ConnectivityResult.mobile || connectivityResult == ConnectivityResult.wifi || connectivityResult == ConnectivityResult.ethernet || connectivityResult == ConnectivityResult.vpn){
|
|
||||||
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_)=>MyHomePage()));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}catch(e){
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
// TODO: implement dispose
|
|
||||||
super.dispose();
|
|
||||||
|
|
||||||
subscription.cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
void kickstartAnimations() async {
|
|
||||||
await Future.delayed(const Duration(milliseconds: 500));
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
op1 = 1;
|
|
||||||
op2 = 1;
|
|
||||||
op3 = 1;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
int id = widget.id;
|
|
||||||
// id = ;
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Colors.black,
|
|
||||||
extendBody: true,
|
|
||||||
body: CustomBody(
|
|
||||||
onAnimEnd: () {
|
|
||||||
setState(() {});
|
|
||||||
|
|
||||||
},
|
|
||||||
context: context,
|
|
||||||
child: SafeArea(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(24.0),
|
|
||||||
child: id == 0 ? NoInternet() : ( id == 1 ? NewUpdate():Maintaince())
|
|
||||||
),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget NoInternet(){
|
|
||||||
return Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween
|
|
||||||
,children: [
|
|
||||||
Center(child: GradientText(text:"No Internet", gradient: LinearGradient(colors: [Colors.white.withOpacity(0.6),Colors.white.withOpacity(0.2)]),style: TextStyle(fontSize: 50,fontWeight: FontWeight.bold),)),
|
|
||||||
Column(children:
|
|
||||||
[
|
|
||||||
Icon(Icons.signal_wifi_connected_no_internet_4,size: 105,color: Colors.white.withOpacity(0.4),),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(15.0),
|
|
||||||
child: Text("This app need an active internet connection to funtion.\nPlease Connect to Internet to continue.",textAlign: TextAlign.center,),
|
|
||||||
)
|
|
||||||
|
|
||||||
]
|
|
||||||
),
|
|
||||||
Column()
|
|
||||||
],);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget NewUpdate(){
|
|
||||||
return Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween
|
|
||||||
,children: [
|
|
||||||
Center(child: GradientText(text:"New Update!", gradient: LinearGradient(colors: [Colors.white.withOpacity(0.6),Colors.white.withOpacity(0.2)]),style: TextStyle(fontSize: 50,fontWeight: FontWeight.bold),)),
|
|
||||||
Column(children:
|
|
||||||
[
|
|
||||||
Icon(Icons.download_outlined,size: 100,color: Colors.white.withOpacity(0.4),),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(15.0),
|
|
||||||
child: Text("Please Update to continue.",textAlign: TextAlign.center,),
|
|
||||||
),
|
|
||||||
SizedBox(height: 30,),
|
|
||||||
GlassButton(onTap: () async{
|
|
||||||
await LaunchApp.openApp(
|
|
||||||
androidPackageName: "https://play.google.com/store/apps/details?id=com.Xperience.FaucetHub",
|
|
||||||
// openStore: false
|
|
||||||
);
|
|
||||||
}, child: Text("Update",style: TextStyle(fontSize: 18,fontWeight: FontWeight.bold),), width: 200,height: 50,color: Colors.greenAccent)
|
|
||||||
|
|
||||||
]
|
|
||||||
),
|
|
||||||
Column()
|
|
||||||
],);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget Maintaince(){
|
|
||||||
return Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween
|
|
||||||
,children: [
|
|
||||||
Center(child: GradientText(text:"Under Maintaince!", gradient: LinearGradient(colors: [Colors.white.withOpacity(0.6),Colors.white.withOpacity(0.2)]),style: TextStyle(fontSize: 38,fontWeight: FontWeight.bold),)),
|
|
||||||
Column(children:
|
|
||||||
[
|
|
||||||
Icon(Icons.developer_mode_outlined,size: 100,color: Colors.white.withOpacity(0.4),),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(30.0),
|
|
||||||
child: Text("Please Check back in later.",textAlign: TextAlign.center,),
|
|
||||||
),
|
|
||||||
|
|
||||||
]
|
|
||||||
),
|
|
||||||
Column()
|
|
||||||
],);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +1,11 @@
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:fhub/backend/DataManager.dart';
|
import 'package:fhub/backend/DataManager.dart';
|
||||||
import 'package:fhub/backend/Dialogs.dart';
|
import 'package:fhub/backend/Dialogs.dart';
|
||||||
import 'package:fhub/backend/login_mgr.dart';
|
import 'package:fhub/backend/login_mgr.dart';
|
||||||
import 'package:fhub/disabled_mode.dart';
|
|
||||||
import 'package:fhub/home.dart';
|
import 'package:fhub/home.dart';
|
||||||
import 'package:fhub/off_screen.dart';
|
|
||||||
import 'package:fhub/src/CustomWidgets.dart';
|
import 'package:fhub/src/CustomWidgets.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_sign_in/google_sign_in.dart';
|
import 'package:google_sign_in/google_sign_in.dart';
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
||||||
import 'backend/DebugHelper.dart';
|
import 'backend/DebugHelper.dart';
|
||||||
|
|
||||||
class MyHomePage extends StatefulWidget {
|
class MyHomePage extends StatefulWidget {
|
||||||
|
|
@ -18,7 +14,7 @@ class MyHomePage extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
State<MyHomePage> createState() => _MyHomePageState();
|
State<MyHomePage> createState() => _MyHomePageState();
|
||||||
}
|
}
|
||||||
var subscription;
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
int counter = -1;
|
int counter = -1;
|
||||||
bool loginLoading = false;
|
bool loginLoading = false;
|
||||||
|
|
@ -28,43 +24,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
super.initState();
|
super.initState();
|
||||||
kickstartAnimations();
|
kickstartAnimations();
|
||||||
init();
|
init();
|
||||||
|
|
||||||
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) async{
|
|
||||||
// Got a new connectivity status!
|
|
||||||
try{
|
|
||||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
|
||||||
Debug.Log(connectivityResult);
|
|
||||||
if(connectivityResult != ConnectivityResult.mobile && connectivityResult != ConnectivityResult.wifi && connectivityResult != ConnectivityResult.ethernet && connectivityResult != ConnectivityResult.vpn){
|
|
||||||
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_)=>OfflinePage(id:0)));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}catch(e){
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
// TODO: implement dispose
|
|
||||||
super.dispose();
|
|
||||||
|
|
||||||
subscription.cancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void init() async{
|
void init() async{
|
||||||
|
|
||||||
int serverVersion = await DataManager.GetVersion();
|
|
||||||
if(serverVersion > 0 && serverVersion != DataManager.ClientVersion){
|
|
||||||
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> UpdatePage()));
|
|
||||||
return;
|
|
||||||
|
|
||||||
}else if(serverVersion <= 0){
|
|
||||||
Navigator.of(context).push(MaterialPageRoute(builder: (context)=> MaintaincePage()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(await DataManager.Init() == false){
|
if(await DataManager.Init() == false){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -316,6 +278,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
GoogleSignIn _googleSignIn = GoogleSignIn(
|
GoogleSignIn _googleSignIn = GoogleSignIn(
|
||||||
scopes: [
|
scopes: [
|
||||||
'email',
|
'email',
|
||||||
|
'https://www.googleapis.com/auth/contacts.readonly',
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,22 +5,14 @@
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import connectivity_plus
|
|
||||||
import firebase_auth
|
import firebase_auth
|
||||||
import firebase_core
|
import firebase_core
|
||||||
import path_provider_foundation
|
|
||||||
import share_plus
|
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import sqflite
|
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
|
||||||
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
|
||||||
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
|
||||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
208
pubspec.lock
|
|
@ -17,14 +17,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.2"
|
version: "4.2.2"
|
||||||
args:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: args
|
|
||||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.4.2"
|
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -41,30 +33,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.1"
|
||||||
cached_network_image:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: cached_network_image
|
|
||||||
sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.2.3"
|
|
||||||
cached_network_image_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cached_network_image_platform_interface
|
|
||||||
sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.0"
|
|
||||||
cached_network_image_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cached_network_image_web
|
|
||||||
sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.2"
|
|
||||||
change_app_package_name:
|
change_app_package_name:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
|
@ -97,38 +65,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.1"
|
version: "1.17.1"
|
||||||
connectivity_plus:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: connectivity_plus
|
|
||||||
sha256: "77a180d6938f78ca7d2382d2240eb626c0f6a735d0bfdce227d8ffb80f95c48b"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.0.2"
|
|
||||||
connectivity_plus_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: connectivity_plus_platform_interface
|
|
||||||
sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.2.4"
|
|
||||||
cross_file:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cross_file
|
|
||||||
sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.3.3+4"
|
|
||||||
crypto:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: crypto
|
|
||||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.3"
|
|
||||||
crypto_font_icons:
|
crypto_font_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -145,14 +81,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
dbus:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: dbus
|
|
||||||
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.8"
|
|
||||||
external_app_launcher:
|
external_app_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -238,22 +166,6 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_blurhash:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_blurhash
|
|
||||||
sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.0"
|
|
||||||
flutter_cache_manager:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_cache_manager
|
|
||||||
sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.3.1"
|
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
|
@ -384,30 +296,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
mime:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: mime
|
|
||||||
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.4"
|
|
||||||
nm:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: nm
|
|
||||||
sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.5.0"
|
|
||||||
octo_image:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: octo_image
|
|
||||||
sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.2"
|
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -416,30 +304,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.8.3"
|
||||||
path_provider:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider
|
|
||||||
sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.15"
|
|
||||||
path_provider_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_android
|
|
||||||
sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.27"
|
|
||||||
path_provider_foundation:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_foundation
|
|
||||||
sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.2.3"
|
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -464,14 +328,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.7"
|
version: "2.1.7"
|
||||||
petitparser:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: petitparser
|
|
||||||
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "5.4.0"
|
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -504,30 +360,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.2.1"
|
version: "3.2.1"
|
||||||
rxdart:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: rxdart
|
|
||||||
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.27.7"
|
|
||||||
share_plus:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: share_plus
|
|
||||||
sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "7.1.0"
|
|
||||||
share_plus_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: share_plus_platform_interface
|
|
||||||
sha256: "357412af4178d8e11d14f41723f80f12caea54cf0d5cd29af9dcdab85d58aea7"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.3.0"
|
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -597,22 +429,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
sqflite:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: sqflite
|
|
||||||
sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.2.8+4"
|
|
||||||
sqflite_common:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: sqflite_common
|
|
||||||
sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.4.5+1"
|
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -637,14 +453,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
synchronized:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: synchronized
|
|
||||||
sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.0"
|
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -733,14 +541,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.0.6"
|
||||||
uuid:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: uuid
|
|
||||||
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.7"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -765,14 +565,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
xml:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: xml
|
|
||||||
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "6.3.0"
|
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.0.1 <4.0.0"
|
dart: ">=3.0.1 <4.0.0"
|
||||||
flutter: ">=3.3.0"
|
flutter: ">=3.3.0"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.6+6
|
version: 1.0.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.1 <4.0.0'
|
sdk: '>=3.0.1 <4.0.0'
|
||||||
|
|
@ -42,9 +42,6 @@ dependencies:
|
||||||
external_app_launcher: ^3.1.0
|
external_app_launcher: ^3.1.0
|
||||||
url_launcher: ^6.1.11
|
url_launcher: ^6.1.11
|
||||||
intl: ^0.18.1
|
intl: ^0.18.1
|
||||||
cached_network_image: ^3.2.3
|
|
||||||
connectivity_plus: ^4.0.2
|
|
||||||
share_plus: ^7.1.0
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,12 @@
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
|
||||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
|
||||||
FirebaseCorePluginCApiRegisterWithRegistrar(
|
FirebaseCorePluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
connectivity_plus
|
|
||||||
firebase_core
|
firebase_core
|
||||||
share_plus
|
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||