Commit d91de89f authored by 关振斌's avatar 关振斌

login

parent 73b33eb7
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "chart",
"request": "launch",
"type": "dart"
},
{
"name": "chart (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "chart (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
\ No newline at end of file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.chart">
<application
android:label="哈哈GPT"
android:label="GPT大师傅"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
......
PODS:
- babstrap_settings_screen (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
- DKImagePickerController/Core (4.3.4):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
......@@ -35,9 +38,34 @@ PODS:
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/Auth (10.3.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.3.0)
- Firebase/CoreOnly (10.3.0):
- FirebaseCore (= 10.3.0)
- firebase_auth (4.2.6):
- Firebase/Auth (= 10.3.0)
- firebase_core
- Flutter
- firebase_core (2.5.0):
- Firebase/CoreOnly (= 10.3.0)
- Flutter
- FirebaseAuth (10.3.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- FirebaseCore (10.3.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreInternal (10.5.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- Flutter (1.0.0)
- flutter_icmp_ping (0.0.1):
- Flutter
- flutter_inapp_purchase (0.0.1):
- Flutter
- flutter_inappwebview (0.0.1):
- Flutter
- flutter_inappwebview/Core (= 0.0.1)
......@@ -48,6 +76,22 @@ PODS:
- fluttertoast (0.0.2):
- Flutter
- Toast
- GoogleUtilities/AppDelegateSwizzler (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.11.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.0)"
- GoogleUtilities/Reachability (7.11.0):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (3.1.0)
- image_picker_ios (0.0.1):
- Flutter
- open_filex (0.0.2):
......@@ -56,12 +100,16 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PromisesObjC (2.1.1)
- ReachabilitySwift (5.0.0)
- SDWebImage (5.15.2):
- SDWebImage/Core (= 5.15.2)
- SDWebImage/Core (5.15.2)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- smart_auth (0.0.1):
- Flutter
- SwiftyGif (5.4.4)
- Toast (4.0.0)
- url_launcher_ios (0.0.1):
......@@ -71,15 +119,20 @@ PODS:
DEPENDENCIES:
- babstrap_settings_screen (from `.symlinks/plugins/babstrap_settings_screen/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- flutter_icmp_ping (from `.symlinks/plugins/flutter_icmp_ping/ios`)
- flutter_inapp_purchase (from `.symlinks/plugins/flutter_inapp_purchase/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- open_filex (from `.symlinks/plugins/open_filex/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
- smart_auth (from `.symlinks/plugins/smart_auth/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
......@@ -87,7 +140,15 @@ SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- Firebase
- FirebaseAuth
- FirebaseCore
- FirebaseCoreInternal
- GoogleUtilities
- GTMSessionFetcher
- OrderedSet
- PromisesObjC
- ReachabilitySwift
- SDWebImage
- SwiftyGif
- Toast
......@@ -95,12 +156,20 @@ SPEC REPOS:
EXTERNAL SOURCES:
babstrap_settings_screen:
:path: ".symlinks/plugins/babstrap_settings_screen/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
Flutter:
:path: Flutter
flutter_icmp_ping:
:path: ".symlinks/plugins/flutter_icmp_ping/ios"
flutter_inapp_purchase:
:path: ".symlinks/plugins/flutter_inapp_purchase/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
fluttertoast:
......@@ -113,6 +182,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
smart_auth:
:path: ".symlinks/plugins/smart_auth/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
......@@ -120,19 +191,32 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
babstrap_settings_screen: 535097da0fa521a47fef6f6678ff2b464ee15937
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Firebase: f92fc551ead69c94168d36c2b26188263860acd9
firebase_auth: b196f91b4f7c6d72015c3c12aaa82eb6972b2c2c
firebase_core: f95c8bbe65213d406d592573ad42a12d64849cb8
FirebaseAuth: 0e415d29d846c1dce2fb641e46f35e9888d9bec6
FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a
FirebaseCoreInternal: e463f41bb935cd049505bf7e9a5bdd7dcea90df6
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_icmp_ping: 2b159955eee0c487c766ad83fec224ae35e7c935
flutter_inapp_purchase: 5c6a1ac3f11b11d0c8c0321c0c41c1f05805e4c8
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GTMSessionFetcher: c9e714f7eec91a55641e2bab9f45fd83a219b882
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
smart_auth: 4bedbc118723912d0e45a07e8ab34039c19e04f2
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: fb12c43172927bb5cf75aeebd073f883801f1993
......
......@@ -46,6 +46,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C08A8E50299A2161008F4DB8 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
D2718D25F9034030E31B924F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
......@@ -112,6 +113,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
C08A8E50299A2161008F4DB8 /* Runner.entitlements */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
......@@ -209,7 +211,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
84EA375A32A6E28C22589FB7 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
......@@ -354,6 +356,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Z99J24WADU;
ENABLE_BITCODE = NO;
......@@ -363,7 +366,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = com.wudi.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
......@@ -485,6 +488,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Z99J24WADU;
ENABLE_BITCODE = NO;
......@@ -494,7 +498,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = com.wudi.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
......@@ -510,6 +514,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Z99J24WADU;
ENABLE_BITCODE = NO;
......@@ -519,7 +524,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = com.wudi.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
......@@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-16" y="-40"/>
</scene>
</scenes>
</document>
......@@ -9,7 +9,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>哈哈GPT</string>
<string>GPT大师傅</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.in-app-payments</key>
<array/>
</dict>
</plist>
class AppUrls {
static const String baseUrl = 'http://192.168.2.178:8083'; // 基础接口地址
static const String baseUrl = 'http://101.34.153.228:8083'; // 基础接口地址
static const String baseApiUrl = '${baseUrl}/api'; // 基础接口地址
// http://101.34.153.228:8083/api/doc.html
// static const String login = '$baseApiUrl/passport/auth/login';
// static const String register = '$baseApiUrl/passport/auth/register';
// static const String getQuickLoginUrl =
......@@ -15,8 +16,10 @@ class AppUrls {
static const String message = '$baseApiUrl/openAi/aiAnswer';
// /api/hotSearch/getHotSearch
static const String getMessageList = '$baseApiUrl/hotSearch/getHotSearch';
static const String getGoodsList = '$baseApiUrl/goods/goodsList';
static const String getUserIntegral = '$baseApiUrl/user/getUserIntegral';
static const String getSearchRecord =
'$baseApiUrl/searchRecord/getSearchRecord';
static const String applePayCallBack = '$baseApiUrl/pay/notifyApplePay';
}
......@@ -2,7 +2,7 @@
//
// final SearchRecordEntity = SearchRecordEntityFromMap(jsonString);
import 'dart:ffi';
// import 'dart:ffi';
import 'package:meta/meta.dart';
import 'dart:convert';
......
......@@ -2,7 +2,7 @@
//
// final userEntity = userEntityFromMap(jsonString);
import 'dart:ffi';
// import 'dart:ffi';
import 'package:meta/meta.dart';
import 'dart:convert';
......@@ -11,7 +11,7 @@ class UserEntity {
UserEntity({
required this.email,
required this.transferEnable,
required this.lastLoginAt,
required this.lastApplePayAt,
required this.createdAt,
required this.banned,
required this.remindExpire,
......@@ -29,7 +29,7 @@ class UserEntity {
final String email;
final int transferEnable;
final DateTime? lastLoginAt;
final DateTime? lastApplePayAt;
final DateTime? createdAt;
final int banned;
final int remindExpire;
......@@ -52,9 +52,10 @@ class UserEntity {
factory UserEntity.fromMap(Map<String, dynamic> json) => UserEntity(
email: json["email"],
transferEnable: json["transfer_enable"],
lastLoginAt: json["last_login_at"] == null
lastApplePayAt: json["last_ApplePay_at"] == null
? null
: DateTime.fromMillisecondsSinceEpoch(json["last_login_at"] * 1000),
: DateTime.fromMillisecondsSinceEpoch(
json["last_ApplePay_at"] * 1000),
createdAt: json["created_at"] == null
? null
: DateTime.fromMillisecondsSinceEpoch(json["created_at"] * 1000),
......@@ -77,9 +78,9 @@ class UserEntity {
Map<String, dynamic> toMap() => {
"email": email,
"transfer_enable": transferEnable,
"last_login_at": lastLoginAt == null
"last_ApplePay_at": lastApplePayAt == null
? null
: lastLoginAt!.millisecondsSinceEpoch ~/ 1000,
: lastApplePayAt!.millisecondsSinceEpoch ~/ 1000,
"created_at": createdAt == null
? null
: createdAt!.millisecondsSinceEpoch ~/ 1000,
......@@ -118,3 +119,99 @@ class IntegralEntity {
Map<String, dynamic> toMap() => {"isd": id, "username": username};
}
// To parse this JSON data, do
//
// final goodEntity = goodEntityFromMap(jsonString);
// import 'dart:ffi';
class goodEntity {
goodEntity(
{required this.updateTime,
required this.amount,
required this.integral,
required this.id,
required this.createTime,
required this.goodsDesc,
required this.isShelf,
required this.goodsName});
// "id": 1,
// "goodsName": "50积分",
// "goodsDesc": "快来购买吧",
// "amount": 0.01,
// "integral": 50,
// "createTime": "2023-02-09T10:15:18.000+00:00",
// "updateTime": "2023-02-09T10:15:18.000+00:00",
// "isShelf": 1
final int id;
final String goodsName;
final String goodsDesc;
final double amount;
final int integral;
final String createTime;
final String updateTime;
final int isShelf;
factory goodEntity.fromJson(String str) =>
goodEntity.fromMap(json.decode(str));
String toJson() => json.encode(toMap());
factory goodEntity.fromMap(Map<String, dynamic> json) => goodEntity(
id: json["id"],
goodsName: json["createTime"],
goodsDesc: json['goodsDesc'],
amount: json['amount'],
integral: json['integral'],
createTime: json['createTime'],
updateTime: json['updateTime'],
isShelf: json['isShelf'],
);
Map<String, dynamic> toMap() => {
"id": id,
"goodsName": goodsName,
"goodsDesc": goodsDesc,
"amount": amount,
"integral": integral,
"createTime": createTime,
"updateTime": updateTime,
"isShelf": isShelf
};
}
List<goodEntity> goodEntityFromList(List data) =>
List<goodEntity>.from(data.map((x) => goodEntity.fromMap(x)));
class ApplePayEntity {
ApplePayEntity(
{required this.status,
required this.message,
required this.data,
required this.timestamp});
final int status;
final String message;
final dynamic data;
final int timestamp;
factory ApplePayEntity.fromJson(String str) =>
ApplePayEntity.fromMap(json.decode(str));
String toJson() => json.encode(toMap());
factory ApplePayEntity.fromMap(Map<String, dynamic> json) => ApplePayEntity(
status: json["status"],
message: json["message"],
timestamp: json['timestamp'],
data: json['data'],
);
Map<String, dynamic> toMap() => {
"status": status,
"message": message,
"data": data,
"timestamp": timestamp
};
}
......@@ -5,20 +5,34 @@ import 'package:provider/provider.dart';
import 'package:chart/router/routers.dart';
import 'package:chart/router/application.dart';
import 'package:flutter/services.dart' as services;
import 'package:chart/constant/app_colors.dart';
// import 'package:chart/constant/app_colors.dart';
import 'package:chart/constant/app_strings.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; //国际化
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
// import 'package:firebase_phone_auth_handler/firebase_phone_auth_handler.dart';
// import 'package:firebase_core/firebase_core.dart';
// import 'package:connectivity_plus/connectivity_plus.dart';
import 'dart:ui';
import 'models/user_model.dart';
// ignore: non_constant_identifier_names
// WidgetsFlutterBinding.ensureInitialized();
// await Firebase.initializeApp();
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// await Firebase.initializeApp();
var appModel = AppModel();
var userViewModel = UserModel();
userViewModel.refreshData();
// var appModel = AppModel();
// var userViewModel = UserModel();
// var userSubscribeModel = UserSubscribeModel();
// var serverModel = ServerModel();
// var userSubscribeModel = UserSubscribeModel();
// var serverModel = ServerModel();
// var planModel = PlanModel();
......@@ -29,6 +43,7 @@ void main() async {
// ChangeNotifierProvider<ServerModel>.value(value: serverModel),
// ChangeNotifierProvider<PlanModel>.value(value: planModel)
], child: ChartApp()));
configLoading();
}
class ChartApp extends StatelessWidget {
......@@ -59,6 +74,7 @@ class ChartApp extends StatelessWidget {
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate //复制
],
builder: EasyLoading.init(),
supportedLocales: const [
Locale('en', 'US'), // 美国英语
Locale('zh', 'CN'), // 中文简体
......@@ -95,3 +111,21 @@ MaterialColor createMaterialColor(Color color) {
});
return MaterialColor(color.value, swatch);
}
void configLoading() {
EasyLoading
.instance
// ..displayDuration = const Duration(milliseconds: 2000)
// ..indicatorType = EasyLoadingIndicatorType.fadingCircle
// ..loadingStyle = EasyLoadingStyle.dark
// ..indicatorSize = 45.0
// ..radius = 10.0
// ..progressColor = Colors.yellow
// ..backgroundColor = Colors.green
// ..indicatorColor = Colors.yellow
// ..textColor = Colors.yellow
// ..maskColor = Colors.blue.withOpacity(0.5)
// ..userInteractions = false
.userInteractions = false;
// ..customAnimation = CustomAnimation();
}
......@@ -32,32 +32,33 @@ class UserModel extends BaseModel {
}
refreshData() async {
_isFirstOpen = await SharedPreferencesUtil.getInstance()
?.getBool(AppStrings.isFirstOpen) ??
true;
String token = await SharedPreferencesUtil.getInstance()
?.getString(AppStrings.token) ??
'';
String authData = await SharedPreferencesUtil.getInstance()
?.getString(AppStrings.authData) ??
'';
if (token != null &&
token.isNotEmpty &&
authData != null &&
authData.isNotEmpty) {
_isLogin = true;
_token = token;
_authData = authData;
Map<String, dynamic> userEntityMap =
await SharedPreferencesUtil.getInstance()
?.getMap(AppStrings.userInfo) ??
<String, dynamic>{};
_userEntity = UserEntity.fromMap(userEntityMap);
notifyListeners();
}
_integralEntity = IntegralEntity(id: 1, username: '');
// _isFirstOpen = await SharedPreferencesUtil.getInstance()
// ?.getBool(AppStrings.isFirstOpen) ??
// true;
// String token = await SharedPreferencesUtil.getInstance()
// ?.getString(AppStrings.token) ??
// '';
// String authData = await SharedPreferencesUtil.getInstance()
// ?.getString(AppStrings.authData) ??
// '';
// if (token != null &&
// token.isNotEmpty &&
// authData != null &&
// authData.isNotEmpty) {
// _isLogin = true;
// _token = token;
// _authData = authData;
// Map<String, dynamic> userEntityMap =
// await SharedPreferencesUtil.getInstance()
// ?.getMap(AppStrings.userInfo) ??
// <String, dynamic>{};
// _userEntity = UserEntity.fromMap(userEntityMap);
// notifyListeners();
// }
}
logout() {
......
This diff is collapsed.
import 'package:chart/models/user_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
// import '../size_confige.dart';
class DoctorAppBar extends StatelessWidget {
const DoctorAppBar({
const DoctorAppBar(
this.userModel, {
Key? key,
}) : super(key: key);
final UserModel userModel;
// late final UserModel _userModel;
// @override
// didChangeDependencies() {
// super.didChangeDependencies();
// _userModel = Provider.of<UserModel>(context);
// }
@override
Widget build(BuildContext context) {
UserModel userViewModel = Provider.of<UserModel>(context);
// final text = Provider.of<String>(context);
// _userModel = Provider.of<UserModel>(context);
// ${userViewModel.integralEntity?.username}
print(userViewModel.integralEntity);
return Container(
// height: 300,
width: double.infinity,
......@@ -19,37 +35,44 @@ class DoctorAppBar extends StatelessWidget {
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
// ignore: prefer_const_literals_to_create_immutables
children: [
// ignore: prefer_const_constructors
Text(
"Hi, 客户one",
"Hi, ${userViewModel.integralEntity?.username}",
// ignore: prefer_const_constructors
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 20),
),
SizedBox(height: 30),
// ignore: prefer_const_constructors
Text(
"欢迎使用哈哈GPT,你可以收获很多",
"欢迎使用GPT大师傅,你可以收获很多",
style: TextStyle(color: Colors.white, fontSize: 12),
),
],
),
Container(
height: 60,
width: 60,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
blurRadius: 3,
offset: Offset(0, 4),
color: Colors.black54,
)
],
color: Color(0xffA295FD),
borderRadius: BorderRadius.circular(5)),
child: ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Image.asset("assets/images/doctor_1.png")),
GestureDetector(
onTap: () => {Navigator.of(context).pushNamed('/goods')},
child: Container(
height: 60,
width: 60,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
blurRadius: 3,
offset: Offset(0, 4),
color: Colors.black54,
)
],
color: Color(0xffA295FD),
borderRadius: BorderRadius.circular(5)),
child: ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Image.asset("assets/images/doctor_1.png")),
),
)
],
),
......
......@@ -9,6 +9,7 @@ import 'dart:math';
import 'package:glassmorphism/glassmorphism.dart';
import '../../../service/message_service.dart';
import '../../chat/chat_page.dart';
const List<Color> kCategoriesPrimaryColor = [
Color(0xffFFCA8C),
......@@ -127,69 +128,80 @@ class SwiperPageState extends State<SwiperPage> {
height: 70,
width: double.infinity,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 14),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
kCategoriesPrimaryColor[index],
kCategoriesSecondryColor[index],
],
),
borderRadius: BorderRadius.circular(16)),
child: const Icon(
Icons.headset_mic,
size: 20,
color: Colors.white,
),
),
const SizedBox(width: 11),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.symmetric(horizontal: 14),
child: GestureDetector(
onTap: () => {
Navigator.of(context).pushNamed("/chat",
arguments: {"question": message.question})
// Navigator.push(context, MaterialPageRoute(builder: (context) {
// return ChatPage();
// }))
// Navigator.of(context).pop({'id': "1"})
// print("${message.question}")
},
child: Row(
children: [
const SizedBox(height: 15),
Text(
message.question,
// ignore: prefer_const_constructors
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.white),
Container(
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
kCategoriesPrimaryColor[index],
kCategoriesSecondryColor[index],
],
),
borderRadius: BorderRadius.circular(16)),
child: const Icon(
Icons.headset_mic,
size: 20,
color: Colors.white,
),
),
const SizedBox(height: 5),
Expanded(
child: SizedBox(
width: 200,
child: Text(
message.resp,
maxLines: 1,
// ignore: prefer_const_constructors
style: TextStyle(
const SizedBox(width: 11),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 15),
Text(
message.question,
// ignore: prefer_const_constructors
style: TextStyle(
fontSize: 14,
decoration: TextDecoration.none,
color: Colors.white,
),
fontWeight: FontWeight.bold,
color: Colors.white),
),
const SizedBox(height: 5),
Expanded(
child: SizedBox(
width: 200,
child: Text(
message.resp,
maxLines: 1,
// ignore: prefer_const_constructors
style: TextStyle(
fontSize: 14,
decoration: TextDecoration.none,
color: Colors.white,
),
overflow: TextOverflow.ellipsis,
// softWrap: true,
// textAlign: TextAlign.left,
// overflow: TextOverflow.ellipsis,
// maxLines: 1,
// style: TextStyle(
// color: Colors.black.withOpacity(0.48), fontSize: 12),
)),
overflow: TextOverflow.ellipsis,
// softWrap: true,
// textAlign: TextAlign.left,
// overflow: TextOverflow.ellipsis,
// maxLines: 1,
// style: TextStyle(
// color: Colors.black.withOpacity(0.48), fontSize: 12),
)),
),
],
),
],
),
],
),
),
)),
));
}
......@@ -215,7 +227,7 @@ class SwiperPageState extends State<SwiperPage> {
height: 230,
child: Swiper(
scrollDirection: Axis.vertical,
// autoplay: true,
autoplay: true,
itemBuilder: (BuildContext context, int index) {
return Container(
......
......@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:chart/constant/app_images.dart';
// import 'package:chart/constant/app_strings.dart';
import 'package:chart/models/user_model.dart';
import 'package:provider/provider.dart';
import 'package:responsive_grid_list/responsive_grid_list.dart';
import 'package:flutter/services.dart';
import 'package:flutter_chat_ui/flutter_chat_ui.dart';
......@@ -30,8 +31,16 @@ class DashBoardPage extends StatefulWidget {
class DashBoardPageState extends State<DashBoardPage> {
var guides = [AppImages.guide1, AppImages.guide2, AppImages.guide3];
late UserModel _userModel;
var _showButton = false;
@override
void didChangeDependencies() async {
super.didChangeDependencies();
_userModel = Provider.of<UserModel>(context);
}
// final FocusNode focusNode = FocusNode();
@override
Widget build(BuildContext context) {
......@@ -49,15 +58,15 @@ class DashBoardPageState extends State<DashBoardPage> {
child: ConstrainedBox(
constraints: BoxConstraints(),
child: GestureDetector(
onTap: () {
// focusNode.unfocus();
SystemChannels.textInput.invokeMethod('TextInput.hide');
},
// onTap: () {
// // focusNode.unfocus();
// SystemChannels.textInput.invokeMethod('TextInput.hide');
// },
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
DoctorAppBar(),
DoctorAppBar(_userModel),
SwiperPage(),
// SwiperColunmPage(),
......
This diff is collapsed.
This diff is collapsed.
......@@ -65,7 +65,7 @@ class GuidePageState extends State<GuidePage> {
height: double.infinity,
);
},
autoplay: false,
autoplay: true,
//自动滚动
loop: false,
//循环滚动
......
......@@ -8,6 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'package:chart/constant/app_strings.dart';
import 'package:chart/constant/app_colors.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
// import 'package:chart/constant/app_dimens.dart';
// import 'package:intl/date_symbol_data_local.dart';
// import 'package:file_picker/file_picker.dart';
......@@ -57,14 +58,16 @@ class HomePageState extends State<HomePage> {
late AppModel _appModel;
GlobalKey<CurvedNavigationBarState> _bottomNavigationKey = GlobalKey();
var subscription;
final _pageList = [DashBoardPage(), SquarePage(), UserPage()];
// late ServerModel _serverModel;
late UserModel _userModel;
String _connectionStatus = 'Unknown';
// late UserSubscribeModel _userSubscribeModel;
bool _isLoadingData = false;
String _appTitle = '哈哈GPT';
String _appTitle = 'GPT大师傅';
dynamic _selectedIndex = 0;
final Connectivity _connectivity = Connectivity();
// int _loadingIndex = 0;
// ignore: prefer_final_fields
List<types.Message> _messages = [];
......@@ -80,14 +83,57 @@ class HomePageState extends State<HomePage> {
void initState() {
super.initState();
_loadMessages();
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
// Navigator.pop();
setState(() => _connectionStatus = result.toString());
print("resultresultresultresultresultresult$result");
// Got a new connectivity status!
});
}
Future<Null> initConnectivity() async {
String connectionStatus;
//平台消息可能会失败,因此我们使用Try/Catch PlatformException。
try {
connectionStatus = (await _connectivity.checkConnectivity()).toString();
} on PlatformException catch (e) {
print(e.toString());
connectionStatus = 'Failed to get connectivity.';
}
// 如果在异步平台消息运行时从树中删除了该小部件,
// 那么我们希望放弃回复,而不是调用setstate来更新我们不存在的外观。
if (!mounted) {
return;
}
setState(() {
_connectionStatus = connectionStatus;
});
}
@override
dispose() {
subscription.cancel();
super.dispose();
}
// @override
// initState() {
// super.initState();
// subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
// // Got a new connectivity status!
// });
// }
@override
void didChangeDependencies() async {
super.didChangeDependencies();
_appModel = Provider.of<AppModel>(context);
_userModel = Provider.of<UserModel>(context);
await _userModel.setIntegralInfo();
}
void jumpToPage(int page) {
......@@ -113,7 +159,7 @@ class HomePageState extends State<HomePage> {
? null
: SailAppBar(
appTitle: _appTitle,
backgroundColor: Color.fromRGBO(246, 248, 247, 1.00),
backgroundColor: Color.fromRGBO(41, 45, 62, 1.00),
),
// extendBody: true,
......
import 'package:easy_container/easy_container.dart';
import 'package:flutter/material.dart';
import 'package:intl_phone_field/intl_phone_field.dart';
import 'package:chart/utils/helpers.dart';
import 'package:chart/pages/login/verify_phone_number_screen.dart';
class AuthenticationScreen extends StatefulWidget {
static const id = 'AuthenticationScreen';
const AuthenticationScreen({
Key? key,
}) : super(key: key);
@override
// ignore: library_private_types_in_public_api
_AuthenticationScreenState createState() => _AuthenticationScreenState();
}
class _AuthenticationScreenState extends State<AuthenticationScreen> {
String? phoneNumber;
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Padding(
padding: const EdgeInsets.all(15),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"We'll send an SMS with a verification code...",
style: TextStyle(fontSize: 22),
),
const SizedBox(height: 15),
EasyContainer(
elevation: 0,
borderRadius: 10,
color: Colors.transparent,
child: Form(
key: _formKey,
child: IntlPhoneField(
autofocus: true,
invalidNumberMessage: 'Invalid Phone Number!',
textAlignVertical: TextAlignVertical.center,
style: const TextStyle(fontSize: 25),
onChanged: (phone) => phoneNumber = phone.completeNumber,
initialCountryCode: 'IN',
flagsButtonPadding: const EdgeInsets.only(right: 10),
showDropdownIcon: false,
keyboardType: TextInputType.phone,
),
),
),
const SizedBox(height: 15),
EasyContainer(
width: double.infinity,
onTap: () async {
if (isNullOrBlank(phoneNumber) ||
!_formKey.currentState!.validate()) {
showSnackBar('Please enter a valid phone number!');
} else {
Navigator.pushNamed(
context,
VerifyPhoneNumberScreen.id,
arguments: phoneNumber,
);
}
},
child: const Text(
'Verify',
style: TextStyle(fontSize: 18),
),
),
],
),
),
),
);
}
}
This diff is collapsed.
import 'package:easy_container/easy_container.dart';
import 'package:firebase_phone_auth_handler/firebase_phone_auth_handler.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:provider/provider.dart';
// import 'package:sail/constant/app_colors.dart';
// import 'package:sail/constant/app_dimens.dart';
// import 'package:sail/models/app_model.dart';
// import 'package:sail/models/plan_model.dart';
// import 'package:sail/models/server_model.dart';
// import 'package:sail/models/user_model.dart';
// import 'package:sail/models/user_subscribe_model.dart';
// import 'package:sail/pages/my_profile.dart';
// import 'package:sail/pages/plan/plan_page.dart';
// import 'package:sail/pages/server_list.dart';
// import 'package:sail/widgets/home_widget.dart';
// import 'package:sail/widgets/power_btn.dart';
// import 'package:sail/widgets/sail_app_bar.dart';
// import 'package:sail/utils/common_util.dart';
import 'package:chart/pages/login/authentication_screen.dart';
import 'package:chart/utils/globals.dart';
import 'package:chart/utils/helpers.dart';
class LoginPage extends StatefulWidget {
const LoginPage({super.key, required this.title});
// import 'package:intl_phone_field/intl_phone_field.dart';
// 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.
class LoginPage extends StatelessWidget {
static const id = 'LoginPage';
// 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;
@override
State<LoginPage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<LoginPage> {
int _counter = 0;
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++;
});
}
const LoginPage({
Key? key,
}) : super(key: key);
@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.headline4,
),
],
return SafeArea(
child: Scaffold(
body: Padding(
padding: const EdgeInsets.all(15),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const Padding(
padding: EdgeInsets.all(15),
// child: ,
// child: SizedBox(
// width: double.infinity,
// child: FittedBox(
// child: Text('Logged in user UID'),
// ),
// ),
),
// SizedBox(
// width: double.infinity,
// child: FittedBox(
// // child: Text(Globals.firebaseUser!.uid),
// ),
// ),
EasyContainer(
onTap: () async {
// await FirebasePhoneAuthHandler.signOut(context);
// showSnackBar('Logged out successfully!');
// ignore: use_build_context_synchronously
// Navigator.pushNamedAndRemoveUntil(
// context,
// AuthenticationScreen.id,
// (route) => false,
// );
},
child: const Text('Logout'),
),
],
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
// Scaffold(
// appBar: AppBar(
// title: Text('Phone Field Example'),
// ),
// body: ,
// );
\ No newline at end of file
import 'package:flutter/material.dart';
// import 'package:phone_auth_handler_demo/screens/authentication_screen.dart';
import 'package:chart/pages/login/authentication_screen.dart';
// import 'package:phone_auth_handler_demo/screens/home_screen.dart';
import 'package:chart/pages/login/login_page.dart';
// import 'package:phone_auth_handler_demo/utils/globals.dart';
// import 'package:phone_auth_handler_demo/widgets/custom_loader.dart';
import 'package:chart/widgets/custom_loader.dart';
import 'package:chart/utils/globals.dart';
// import 'package:chart/utils/helpers.dart';
class SplashScreen extends StatefulWidget {
static const id = 'SplashScreen';
const SplashScreen({
Key? key,
}) : super(key: key);
@override
// ignore: library_private_types_in_public_api
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
(() async {
await Future.delayed(Duration.zero);
final isLoggedIn = Globals.firebaseUser != null;
if (!mounted) return;
Navigator.pushReplacementNamed(
context,
isLoggedIn ? LoginPage.id : AuthenticationScreen.id,
);
})();
super.initState();
}
@override
Widget build(BuildContext context) {
return const SafeArea(
child: Scaffold(
body: CustomLoader(),
),
);
}
}
import 'package:firebase_phone_auth_handler/firebase_phone_auth_handler.dart';
import 'package:flutter/material.dart';
import 'package:chart/pages/login/login_page.dart';
// import 'package:phone_auth_handler_demo/utils/helpers.dart';
import 'package:chart/widgets/custom_loader.dart';
import 'package:chart/widgets/pin_input_field.dart';
// import 'package:chart/utils/globals.dart';
import 'package:chart/utils/helpers.dart';
// import 'package:phone_auth_handler_demo/utils/helpers.dart';
// import 'package:phone_auth_handler_demo/widgets/custom_loader.dart';
// import 'package:phone_auth_handler_demo/widgets/pin_input_field.dart';
class VerifyPhoneNumberScreen extends StatefulWidget {
static const id = 'VerifyPhoneNumberScreen';
final String phoneNumber;
const VerifyPhoneNumberScreen({
Key? key,
required this.phoneNumber,
}) : super(key: key);
@override
State<VerifyPhoneNumberScreen> createState() =>
_VerifyPhoneNumberScreenState();
}
class _VerifyPhoneNumberScreenState extends State<VerifyPhoneNumberScreen>
with WidgetsBindingObserver {
bool isKeyboardVisible = false;
late final ScrollController scrollController;
@override
void initState() {
scrollController = ScrollController();
WidgetsBinding.instance.addObserver(this);
super.initState();
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
scrollController.dispose();
super.dispose();
}
@override
void didChangeMetrics() {
final bottomViewInsets = WidgetsBinding.instance.window.viewInsets.bottom;
isKeyboardVisible = bottomViewInsets > 0;
}
// scroll to bottom of screen, when pin input field is in focus.
Future<void> _scrollToBottomOnKeyboardOpen() async {
while (!isKeyboardVisible) {
await Future.delayed(const Duration(milliseconds: 50));
}
await Future.delayed(const Duration(milliseconds: 250));
await scrollController.animateTo(
scrollController.position.maxScrollExtent,
duration: const Duration(milliseconds: 250),
curve: Curves.easeIn,
);
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: FirebasePhoneAuthHandler(
phoneNumber: widget.phoneNumber,
signOutOnSuccessfulVerification: false,
sendOtpOnInitialize: true,
linkWithExistingUser: false,
autoRetrievalTimeOutDuration: const Duration(seconds: 60),
otpExpirationDuration: const Duration(seconds: 60),
onCodeSent: () {
log(VerifyPhoneNumberScreen.id, msg: 'OTP sent!');
},
onLoginSuccess: (userCredential, autoVerified) async {
log(
VerifyPhoneNumberScreen.id,
msg: autoVerified
? 'OTP was fetched automatically!'
: 'OTP was verified manually!',
);
showSnackBar('Phone number verified successfully!');
log(
VerifyPhoneNumberScreen.id,
msg: 'Login Success UID: ${userCredential.user?.uid}',
);
Navigator.pushNamedAndRemoveUntil(
context,
LoginPage.id,
(route) => false,
);
},
onLoginFailed: (authException, stackTrace) {
log(
VerifyPhoneNumberScreen.id,
msg: authException.message,
error: authException,
stackTrace: stackTrace,
);
switch (authException.code) {
case 'invalid-phone-number':
// invalid phone number
return showSnackBar('Invalid phone number!');
case 'invalid-verification-code':
// invalid otp entered
return showSnackBar('The entered OTP is invalid!');
// handle other error codes
default:
showSnackBar('Something went wrong!');
// handle error further if needed
}
},
onError: (error, stackTrace) {
log(
VerifyPhoneNumberScreen.id,
error: error,
stackTrace: stackTrace,
);
showSnackBar('An error occurred!');
},
builder: (context, controller) {
return Scaffold(
appBar: AppBar(
leadingWidth: 0,
leading: const SizedBox.shrink(),
title: const Text('Verify Phone Number'),
actions: [
if (controller.codeSent)
TextButton(
onPressed: controller.isOtpExpired
? () async {
log(VerifyPhoneNumberScreen.id, msg: 'Resend OTP');
await controller.sendOTP();
}
: null,
child: Text(
controller.isOtpExpired
? 'Resend'
: '${controller.otpExpirationTimeLeft.inSeconds}s',
style: const TextStyle(color: Colors.blue, fontSize: 18),
),
),
const SizedBox(width: 5),
],
),
body: controller.isSendingCode
? Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
CustomLoader(),
SizedBox(height: 50),
Center(
child: Text(
'Sending OTP',
style: TextStyle(fontSize: 25),
),
),
],
)
: ListView(
padding: const EdgeInsets.all(20),
controller: scrollController,
children: [
Text(
"We've sent an SMS with a verification code to ${widget.phoneNumber}",
style: const TextStyle(fontSize: 25),
),
const SizedBox(height: 10),
const Divider(),
if (controller.isListeningForOtpAutoRetrieve)
Column(
children: const [
CustomLoader(),
SizedBox(height: 50),
Text(
'Listening for OTP',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 15),
Divider(),
Text('OR', textAlign: TextAlign.center),
Divider(),
],
),
const SizedBox(height: 15),
const Text(
'Enter OTP',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 15),
PinInputField(
length: 6,
onFocusChange: (hasFocus) async {
if (hasFocus) await _scrollToBottomOnKeyboardOpen();
},
onSubmit: (enteredOtp) async {
final verified =
await controller.verifyOtp(enteredOtp);
if (verified) {
// number verify success
// will call onLoginSuccess handler
} else {
// phone verification failed
// will call onLoginFailed or onError callbacks with the error
}
},
),
],
),
);
},
),
);
}
}
......@@ -148,59 +148,56 @@ class SquarePageState extends State<SquarePage> {
Widget build(BuildContext context) {
UserModel().setIsFirstOpen(false);
return Scaffold(
// backgroundColor: Color(0xFFF4F4F4),
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: Image.asset("assets/images/bg.png").image,
fit: BoxFit.cover),
),
// padding: EdgeInsets.only(top: 10),
child: SmartRefresher(
enablePullDown: true,
enablePullUp: _isDown ? false : true,
header: WaterDropHeader(),
controller: _refreshController,
onRefresh: _isDown ? null : _onRefresh,
onLoading: _onLoading,
child: ListView.builder(
// itemBuilder: (c, i) => Card(child: Center(child: Text(items[i]))),
itemBuilder: (c, i) => Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Container(
// color: Colors.black,
margin: EdgeInsets.only(top: 10),
padding: const EdgeInsets.symmetric(horizontal: 16),
// padding: EdgeInsets.all(16),
// flex: 1,
child: Column(children: [
SizedBox(height: 0),
glassCard(context, i, _records)
]),
)
// BigUserCard(
// // cardColor: Colors.red,
// userName: "Babacar Ndon222g",
// userProfilePic: AssetImage("assets/images/logo.png"),
// cardActionWidget: SettingsItem(
// icons: Icons.edit,
// iconStyle: IconStyle(
// withBackground: true,
// borderRadius: 50,
// backgroundColor: Colors.yellow[600],
// ),
// title: "${_records[i].question}",
// subtitle: _records[i].createTime,
// onTap: () {
// print("OK");
// },
// ),
// ),
),
itemExtent: 240.0,
itemCount: _records.length,
),
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: Image.asset("assets/images/bg.png").image,
fit: BoxFit.cover),
),
// padding: EdgeInsets.only(top: 10),
child: SmartRefresher(
enablePullDown: true,
enablePullUp: _isDown ? false : true,
header: WaterDropHeader(),
controller: _refreshController,
onRefresh: _isDown ? null : _onRefresh,
onLoading: _onLoading,
child: ListView.builder(
// itemBuilder: (c, i) => Card(child: Center(child: Text(items[i]))),
itemBuilder: (c, i) => Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Container(
// color: Colors.black,
margin: EdgeInsets.only(top: 10),
padding: const EdgeInsets.symmetric(horizontal: 16),
// padding: EdgeInsets.all(16),
// flex: 1,
child: Column(children: [
SizedBox(height: 0),
glassCard(context, i, _records)
]),
)
// BigUserCard(
// // cardColor: Colors.red,
// userName: "Babacar Ndon222g",
// userProfilePic: AssetImage("assets/images/logo.png"),
// cardActionWidget: SettingsItem(
// icons: Icons.edit,
// iconStyle: IconStyle(
// withBackground: true,
// borderRadius: 50,
// backgroundColor: Colors.yellow[600],
// ),
// title: "${_records[i].question}",
// subtitle: _records[i].createTime,
// onTap: () {
// print("OK");
// },
// ),
// ),
),
itemExtent: 240.0,
itemCount: _records.length,
),
),
);
......
......@@ -21,92 +21,91 @@ class UserPageState extends State<UserPage> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
backgroundColor: Color(0xFFF4F4F4),
body: Padding(
padding: const EdgeInsets.all(10),
child: ListView(
children: [
// User card
BigUserCard(
// cardColor: Colors.red,
userName: "Babacar Ndong",
userProfilePic: AssetImage("assets/images/logo.png"),
cardActionWidget: SettingsItem(
icons: Icons.edit,
return Padding(
padding: const EdgeInsets.all(10),
child: ListView(
children: [
// User card
BigUserCard(
// cardColor: Colors.red,
userName: "Babacar Ndong",
userProfilePic: AssetImage("assets/images/logo.png"),
cardActionWidget: SettingsItem(
icons: Icons.edit,
iconStyle: IconStyle(
withBackground: true,
borderRadius: 50,
backgroundColor: Colors.yellow[600],
),
title: "Modify",
subtitle: "Tap to change your data",
onTap: () {
print("OK");
},
),
),
SettingsGroup(
items: [
SettingsItem(
onTap: () {},
icons: Icons.exit_to_app_rounded,
iconStyle: IconStyle(),
title: 'Appearance',
subtitle: "Make Ziar'App yours",
),
SettingsItem(
onTap: () {},
icons: Icons.dark_mode_rounded,
iconStyle: IconStyle(
iconsColor: Colors.white,
withBackground: true,
borderRadius: 50,
backgroundColor: Colors.yellow[600],
backgroundColor: Colors.red,
),
title: "Modify",
subtitle: "Tap to change your data",
title: 'Dark mode',
subtitle: "Automatic",
trailing: Switch.adaptive(
value: false,
onChanged: (value) {},
),
),
],
),
SettingsGroup(
items: [
SettingsItem(
onTap: () {},
icons: Icons.info_rounded,
iconStyle: IconStyle(
backgroundColor: Colors.purple,
),
title: 'About',
subtitle: "Learn more about Ziar'App",
),
],
),
// You can add a settings title
SettingsGroup(
settingsGroupTitle: "Account",
items: [
SettingsItem(
onTap: () {
print("OK");
Navigator.of(context).pushNamed('/login');
},
icons: Icons.exit_to_app_rounded,
title: "Sign Out",
),
),
SettingsGroup(
items: [
SettingsItem(
onTap: () {},
icons: Icons.exit_to_app_rounded,
iconStyle: IconStyle(),
title: 'Appearance',
subtitle: "Make Ziar'App yours",
SettingsItem(
onTap: () {},
icons: Icons.exit_to_app_rounded,
title: "Delete account",
titleStyle: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
),
SettingsItem(
onTap: () {},
icons: Icons.dark_mode_rounded,
iconStyle: IconStyle(
iconsColor: Colors.white,
withBackground: true,
backgroundColor: Colors.red,
),
title: 'Dark mode',
subtitle: "Automatic",
trailing: Switch.adaptive(
value: false,
onChanged: (value) {},
),
),
],
),
SettingsGroup(
items: [
SettingsItem(
onTap: () {},
icons: Icons.info_rounded,
iconStyle: IconStyle(
backgroundColor: Colors.purple,
),
title: 'About',
subtitle: "Learn more about Ziar'App",
),
],
),
// You can add a settings title
SettingsGroup(
settingsGroupTitle: "Account",
items: [
SettingsItem(
onTap: () {},
icons: Icons.exit_to_app_rounded,
title: "Sign Out",
),
SettingsItem(
onTap: () {},
icons: Icons.exit_to_app_rounded,
title: "Delete account",
titleStyle: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
),
),
],
),
],
),
),
],
),
],
),
);
}
......
......@@ -4,6 +4,8 @@ import 'package:chart/pages/home/home_page.dart';
// import 'package:sail/pages/404/not_find_page.dart';
import 'package:chart/pages/login/login_page.dart';
import 'package:chart/pages/chat/chat_page.dart';
import 'package:chart/pages/goods/goods_page.dart';
// import 'package:/chart/pages/goods/goods_page.dart';
// import 'package:sail/pages/plan/plan_page.dart';
// import 'package:sail/pages/server_list.dart';
// import 'package:sail/pages/webview_widget.dart';
......@@ -19,7 +21,7 @@ import 'package:chart/pages/chat/chat_page.dart';
/// 登录页
Handler loginHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> parameters) {
return const LoginPage(title: '登陆页');
return const LoginPage();
});
/// 首页
......@@ -28,6 +30,12 @@ Handler homeHandler = Handler(
return const HomePage();
});
/// goods
Handler goodsHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> parameters) {
return const GoodsPage();
});
/// 404页面
// Handler notFindHandler = Handler(
// handlerFunc: (BuildContext? context, Map<String, List<String>> parameters) {
......
......@@ -9,6 +9,7 @@ class Routers {
static String serverList = '/server-list';
static String webView = "/web-view";
static String chat = "/chat";
static String goods = "/goods";
static void configureRoutes(FluroRouter router) {
// router.notFoundHandler = notFindHandler;
......@@ -19,6 +20,7 @@ class Routers {
router.define(chat, handler: chatHandle);
router.define(goods, handler: goodsHandler);
// router.define(serverList, handler: serverListHandler);
// router.define(webView, handler: webViewHandler);
......
......@@ -40,4 +40,21 @@ class UserService {
return IntegralEntity.fromMap(result['data']);
});
}
Future<List<goodEntity>>? getGoodsList() {
return HttpUtil.instance?.get(AppUrls.getGoodsList).then((result) {
return goodEntityFromList(result['data']);
});
}
Future<ApplePayEntity>? applePayCallBack(Map<String, dynamic> parameters) {
return HttpUtil.instance
?.post(AppUrls.applePayCallBack, parameters: parameters)
.then((result) {
return ApplePayEntity.fromMap(result['data']);
});
}
}
// getGoodsList
\ No newline at end of file
......@@ -2,7 +2,7 @@ import 'dart:core' as core;
import 'package:flutter/foundation.dart';
void print (core.Object object) {
void print(core.Object object) {
if (kDebugMode) {
core.print(object);
}
......
import 'package:firebase_phone_auth_handler/firebase_phone_auth_handler.dart';
import 'package:flutter/material.dart';
class Globals {
const Globals._();
static final auth = FirebaseAuth.instance;
static User? get firebaseUser => auth.currentUser;
static final scaffoldMessengerKey = GlobalKey<ScaffoldMessengerState>();
}
import 'dart:developer' as devtools show log;
import 'package:flutter/material.dart';
import 'package:chart/utils/globals.dart';
void showSnackBar(
String text, {
Duration duration = const Duration(seconds: 2),
}) {
Globals.scaffoldMessengerKey.currentState
?..clearSnackBars()
..showSnackBar(
SnackBar(content: Text(text), duration: duration),
);
}
bool isNullOrBlank(String? data) => data?.trim().isEmpty ?? true;
void log(
String screenId, {
dynamic msg,
dynamic error,
StackTrace? stackTrace,
}) =>
devtools.log(
msg.toString(),
error: error,
name: screenId,
stackTrace: stackTrace,
);
......@@ -18,8 +18,8 @@ class HttpUtil {
HttpUtil() {
BaseOptions options = BaseOptions(
connectTimeout: 60000,
receiveTimeout: 60000,
connectTimeout: 30000,
receiveTimeout: 30000,
);
dio = Dio(options);
dio.interceptors
......
import 'package:flutter/material.dart';
class CustomLoader extends StatelessWidget {
static const id = 'CustomLoader';
final Color? color;
final double radius;
final double padding;
const CustomLoader({
Key? key,
this.color,
this.radius = 15,
this.padding = 5,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(padding),
child: Center(
child: SizedBox(
height: radius * 2,
width: radius * 2,
child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
color ?? Theme.of(context).colorScheme.secondary,
),
),
),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:pinput/pinput.dart';
class PinInputField extends StatefulWidget {
final int length;
final void Function(bool)? onFocusChange;
final void Function(String) onSubmit;
const PinInputField({
Key? key,
this.length = 6,
this.onFocusChange,
required this.onSubmit,
}) : super(key: key);
@override
// ignore: library_private_types_in_public_api
_PinInputFieldState createState() => _PinInputFieldState();
}
class _PinInputFieldState extends State<PinInputField> {
late final TextEditingController _pinPutController;
late final FocusNode _pinPutFocusNode;
late final int _length;
Size _findContainerSize(BuildContext context) {
// full screen width
double width = MediaQuery.of(context).size.width * 0.85;
// using left-over space to get width of each container
width /= _length;
return Size.square(width);
}
@override
void initState() {
_pinPutController = TextEditingController();
_pinPutFocusNode = FocusNode();
if (widget.onFocusChange != null) {
_pinPutFocusNode.addListener(() {
widget.onFocusChange!(_pinPutFocusNode.hasFocus);
});
}
_length = widget.length;
super.initState();
}
@override
void dispose() {
_pinPutController.dispose();
_pinPutFocusNode.dispose();
super.dispose();
}
PinTheme _getPinTheme(
BuildContext context, {
required Size size,
}) {
return PinTheme(
height: size.height,
width: size.width,
textStyle: const TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(7.5),
),
);
}
static const _focusScaleFactor = 1.15;
@override
Widget build(BuildContext context) {
final size = _findContainerSize(context);
final defaultPinTheme = _getPinTheme(context, size: size);
return SizedBox(
height: size.height * _focusScaleFactor,
child: Pinput(
length: _length,
defaultPinTheme: defaultPinTheme,
focusedPinTheme: defaultPinTheme.copyWith(
height: size.height * _focusScaleFactor,
width: size.width * _focusScaleFactor,
decoration: defaultPinTheme.decoration!.copyWith(
border: Border.all(color: Theme.of(context).colorScheme.secondary),
),
),
errorPinTheme: defaultPinTheme.copyWith(
decoration: BoxDecoration(
color: Theme.of(context).errorColor,
borderRadius: BorderRadius.circular(8),
),
),
focusNode: _pinPutFocusNode,
controller: _pinPutController,
onCompleted: widget.onSubmit,
pinAnimationType: PinAnimationType.scale,
// submittedFieldDecoration: _pinPutDecoration,
// selectedFieldDecoration: _pinPutDecoration,
// followingFieldDecoration: _pinPutDecoration,
// textStyle: const TextStyle(
// color: Colors.black,
// fontSize: 20.0,
// fontWeight: FontWeight.w600,
// ),
),
);
}
}
......@@ -32,7 +32,7 @@ class SailAppBarState extends State<SailAppBar> {
title: Text(
widget.appTitle,
style: const TextStyle(
color: Color.fromRGBO(46, 47, 47, 1.00), fontSize: 16),
color: Color.fromRGBO(255, 255, 255, 1.00), fontSize: 16),
),
// rgba(246, 248, 247, 1.00)
backgroundColor: widget.backgroundColor,
......
......@@ -6,9 +6,13 @@
#include "generated_plugin_registrant.h"
#include <smart_auth/smart_auth_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) smart_auth_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SmartAuthPlugin");
smart_auth_plugin_register_with_registrar(smart_auth_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
......
......@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
smart_auth
url_launcher_linux
)
......
......@@ -5,12 +5,20 @@
import FlutterMacOS
import Foundation
import connectivity_plus
import firebase_auth
import firebase_core
import path_provider_foundation
import shared_preferences_foundation
import smart_auth
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SmartAuthPlugin.register(with: registry.registrar(forPlugin: "SmartAuthPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.13"
animated_text_kit:
dependency: "direct main"
description:
......@@ -22,6 +29,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
async:
dependency: transitive
description:
......@@ -78,6 +92,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
connectivity_plus:
dependency: "direct main"
description:
name: connectivity_plus
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.3"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.4"
crisp:
dependency: "direct main"
description:
......@@ -120,6 +148,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
dbus:
dependency: transitive
description:
name: dbus
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.8"
diffutil_dart:
dependency: transitive
description:
......@@ -134,6 +169,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.6"
easy_container:
dependency: "direct main"
description:
name: easy_container
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
equatable:
dependency: transitive
description:
......@@ -169,6 +211,55 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.5"
firebase_auth:
dependency: transitive
description:
name: firebase_auth
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.6"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "6.11.8"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.5"
firebase_core:
dependency: transitive
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.3"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
firebase_phone_auth_handler:
dependency: "direct main"
description:
name: firebase_phone_auth_handler
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.8"
fluro:
dependency: "direct main"
description:
......@@ -195,6 +286,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.6"
flutter_easyloading:
dependency: "direct main"
description:
name: flutter_easyloading
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.5"
flutter_easyrefresh:
dependency: "direct main"
description:
......@@ -216,6 +314,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter_inapp_purchase:
dependency: "direct main"
description:
name: flutter_inapp_purchase
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
flutter_inappwebview:
dependency: transitive
description:
......@@ -291,6 +396,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
flutter_spinkit:
dependency: "direct main"
description:
name: flutter_spinkit
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
flutter_staggered_grid_view:
dependency: "direct main"
description:
name: flutter_staggered_grid_view
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
flutter_tags:
dependency: "direct main"
description:
......@@ -399,6 +518,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
intl_phone_field:
dependency: "direct main"
description:
name: intl_phone_field
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
js:
dependency: transitive
description:
......@@ -469,6 +595,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
nm:
dependency: transitive
description:
name: nm
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
open_filex:
dependency: "direct main"
description:
......@@ -525,6 +658,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
photo_view:
dependency: transitive
description:
......@@ -532,6 +672,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0"
pinput:
dependency: "direct main"
description:
name: pinput
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.21"
platform:
dependency: transitive
description:
......@@ -649,6 +796,13 @@ packages:
description: flutter
source: sdk
version: "0.0.99"
smart_auth:
dependency: transitive
description:
name: smart_auth
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.8"
smooth_page_indicator:
dependency: "direct main"
description:
......@@ -706,7 +860,7 @@ packages:
source: hosted
version: "1.3.1"
url_launcher:
dependency: transitive
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
......@@ -824,6 +978,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+3"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.0"
sdks:
dart: ">=2.18.6 <3.0.0"
flutter: ">=3.3.0"
......@@ -82,6 +82,16 @@ dependencies:
card_swiper: ^2.0.4
glass_kit: ^2.0.1
glassmorphism: ^3.0.0
url_launcher: ^6.1.9
flutter_inapp_purchase: ^5.3.1
flutter_staggered_grid_view: ^0.6.2
flutter_spinkit: ^5.1.0
flutter_easyloading: ^3.0.5
connectivity_plus: ^3.0.3
pinput: ^2.2.21
firebase_phone_auth_handler: ^1.0.8
easy_container: ^1.0.4
intl_phone_field: ^3.1.0
# package:bubble/bubble.dart
dev_dependencies:
......
......@@ -6,9 +6,15 @@
#include "generated_plugin_registrant.h"
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <smart_auth/smart_auth_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
SmartAuthPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SmartAuthPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}
......@@ -3,6 +3,8 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
smart_auth
url_launcher_windows
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment