Commit 3699105f authored by 关振斌's avatar 关振斌

一些修改

parent 146a15d2
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"size" : "29x29",
"filename" : "Icon-App-29x29@2x 1.png",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "logo-removebg-preview (4) 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "logo-removebg-preview (4) 2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "logo-removebg-preview (4).png",
"idiom" : "universal",
"scale" : "3x"
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?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" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
......@@ -14,9 +16,11 @@
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="186.66666666666666" y="416" width="20" height="20"/>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -28,10 +32,10 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="80.916030534351137" y="264.08450704225356"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchImage" width="20" height="20"/>
</resources>
</document>
......@@ -14,12 +14,13 @@ class RouteWelcomeMiddleware extends GetMiddleware {
@override
RouteSettings? redirect(String? route) {
if (ConfigStore.to.isFirstOpen == true) {
if (ConfigStore.to.isFirstOpen == false) {
return null;
} else if (UserStore.to.isLogin == true) {
return RouteSettings(name: AppRoutes.Application);
} else {
return RouteSettings(name: AppRoutes.SIGN_IN);
return RouteSettings(name: AppRoutes.Application);
// return RouteSettings(name: AppRoutes.SIGN_IN);
}
}
}
......@@ -30,7 +30,7 @@ class ConfigStore extends GetxController {
// 标记用户已打开APP
Future<bool> saveAlreadyOpen() {
return StorageService.to.setBool(STORAGE_DEVICE_FIRST_OPEN_KEY, false);
return StorageService.to.setBool(STORAGE_DEVICE_FIRST_OPEN_KEY, true);
}
void onInitLocale() {
......
......@@ -21,7 +21,7 @@ class UserStore extends GetxController {
// 令牌 token
String token = '';
// 用户 profile
final _profile = IntegralEntity(id: 0, token: '', username: '').obs;
final _profile = IntegralEntity(id: '', token: '', username: '').obs;
bool get isLogin => _isLogin.value;
IntegralEntity get profile => _profile.value;
......@@ -52,9 +52,9 @@ class UserStore extends GetxController {
await getUserInfo(
IntegralEntity(id: res.id, username: res.username, token: res.token));
_isLogin.value = true;
Get.offAndToNamed(AppRoutes.Application);
Get.put(ApplicationController());
Get.back();
// Get.put(ApplicationController());
// Get.offAndToNamed(AppRoutes.Application);
}
getUserInfo(IntegralEntity userInfo) async {
......@@ -112,6 +112,6 @@ class UserStore extends GetxController {
_profile.value = IntegralEntity(id: '', username: '', token: '');
saveProfile(IntegralEntity(id: '', username: '', token: ''));
Get.offAllNamed(AppRoutes.SIGN_IN);
Get.toNamed(AppRoutes.Application);
}
}
......@@ -101,9 +101,11 @@ class _MessageListState extends State<MessageList> {
isBeforeDateSeparator,
),
] else
// Text('121')
MessageRow(
message: widget.messages[i],
nextMessage: nextMessage,
index: i,
previousMessage: previousMessage,
currentUser: widget.currentUser,
isAfterDateSeparator: isAfterDateSeparator,
......
......@@ -7,10 +7,14 @@ class DefaultMessageText extends StatelessWidget {
required this.message,
required this.messageLength,
required this.isOwnMessage,
required this.index,
this.messageOptions = const MessageOptions(),
Key? key,
// required int index,
}) : super(key: key);
final int index;
final List<ChatMessage> messageLength;
/// Message tha contains the text to show
......@@ -29,7 +33,7 @@ class DefaultMessageText extends StatelessWidget {
isOwnMessage ? CrossAxisAlignment.end : CrossAxisAlignment.start,
children: <Widget>[
Wrap(
children: getMessage(isOwnMessage, messageLength),
children: getMessage(isOwnMessage, messageLength, index),
),
if (messageOptions.showTime)
messageOptions.messageTimeBuilder != null
......@@ -52,7 +56,8 @@ class DefaultMessageText extends StatelessWidget {
);
}
List<Widget> getMessage(bool isOwnMessage, List<ChatMessage> messageLength) {
List<Widget> getMessage(
bool isOwnMessage, List<ChatMessage> messageLength, int index) {
if (message.mentions != null && message.mentions!.isNotEmpty) {
String stringRegex = r'([\s\S]*)';
String stringMentionRegex = '';
......@@ -77,7 +82,7 @@ class DefaultMessageText extends StatelessWidget {
);
res.add(getMention(mention));
} else {
res.add(getParsePattern(part, false, messageLength));
res.add(getParsePattern(part, false, messageLength, index));
}
});
if (res.isNotEmpty) {
......@@ -85,14 +90,15 @@ class DefaultMessageText extends StatelessWidget {
}
}
}
return <Widget>[getParsePattern(message.text, isOwnMessage, messageLength)];
return <Widget>[
getParsePattern(message.text, isOwnMessage, messageLength, index)
];
}
Widget getPostMessageBuild(
String text, List<ChatMessage> messageLength, bool isOwnMessage) {
Widget getPostMessageBuild(String text, List<ChatMessage> messageLength,
bool isOwnMessage, int index) {
var lastMessage = messageLength.first;
print(lastMessage.text);
// if(lastMessage.) {
// }
......@@ -100,7 +106,8 @@ class DefaultMessageText extends StatelessWidget {
// if(a.is)
// if()
return lastMessage.text == text
return index == 0
? AnimatedTextKit(
animatedTexts: [
TypewriterAnimatedText(
......@@ -124,9 +131,10 @@ class DefaultMessageText extends StatelessWidget {
String text,
bool isOwnMessage,
List<ChatMessage> messageLength,
int index,
) {
return !isOwnMessage
? getPostMessageBuild(text, messageLength, isOwnMessage)
? getPostMessageBuild(text, messageLength, isOwnMessage, index)
: ParsedText(
parse: messageOptions.parsePatterns != null
? messageOptions.parsePatterns!
......
......@@ -54,6 +54,7 @@ class MediaContainer extends StatelessWidget {
);
default:
return TextContainer(
index: 0,
isOwnMessage: isOwnMessage,
messageOptions: messageOptions,
message: message,
......
......@@ -6,6 +6,7 @@ class MessageRow extends StatelessWidget {
required this.message,
required this.currentUser,
required this.messageLength,
required this.index,
this.previousMessage,
this.nextMessage,
this.isAfterDateSeparator = false,
......@@ -16,6 +17,8 @@ class MessageRow extends StatelessWidget {
final List<ChatMessage> messageLength;
final int index;
/// Current message to show
final ChatMessage message;
......@@ -54,7 +57,7 @@ class MessageRow extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("messageLengthmessageLength$messageLength");
// print("messageLengthmessageLength$messageLength");
final bool isOwnMessage = message.user.id == currentUser.id;
bool isPreviousSameAuthor = false;
bool isNextSameAuthor = false;
......@@ -123,6 +126,7 @@ class MessageRow extends StatelessWidget {
),
if (message.text.isNotEmpty)
TextContainer(
index: index,
messageOptions: messageOptions,
message: message,
messageLength: messageLength,
......
......@@ -8,6 +8,7 @@ class TextContainer extends StatelessWidget {
this.previousMessage,
this.nextMessage,
required this.messageLength,
required this.index,
this.isOwnMessage = false,
this.isPreviousSameAuthor = false,
this.isNextSameAuthor = false,
......@@ -17,6 +18,8 @@ class TextContainer extends StatelessWidget {
Key? key,
}) : super(key: key);
final int index;
final List<ChatMessage> messageLength;
/// Options to customize the behaviour and design of the messages
......@@ -83,6 +86,7 @@ class TextContainer extends StatelessWidget {
child: messageTextBuilder != null
? messageTextBuilder!(message, previousMessage, nextMessage)
: DefaultMessageText(
index: index,
messageLength: messageLength,
message: message,
isOwnMessage: isOwnMessage,
......
......@@ -81,18 +81,32 @@ class ChatNewController extends GetxController {
// ("正在思考中...");
try {
String? result = await NewsAPI.sendMessage(
{"question": message.text, "id": "${UserStore.to.profile.id}"});
// _cancelLoading();
final receiveMessage = Chat.ChatMessage(
user: receiveUser,
createdAt: DateTime.now(),
// id: const Uuid().v4(),
text: "$result",
);
_addMessage(receiveMessage);
EasyLoading.dismiss();
Vibrate.feedback(FeedbackType.success);
// print("1321312321${UserStore.to.profile.id}");
if (UserStore.to.profile.id != '') {
String? result = await NewsAPI.sendMessage(
{"question": message.text, "id": "${UserStore.to.profile.id}"});
// _cancelLoading();
final receiveMessage = Chat.ChatMessage(
user: receiveUser,
createdAt: DateTime.now(),
// id: const Uuid().v4(),
text: "$result",
);
_addMessage(receiveMessage);
EasyLoading.dismiss();
Vibrate.feedback(FeedbackType.success);
} else {
final receiveErrorMessage = Chat.ChatMessage(
user: receiveUser,
createdAt: DateTime.now(),
// id: const Uuid().v4(),
text: "你还未登录,请登录后再体验更多功能。",
);
_addMessage(receiveErrorMessage);
EasyLoading.dismiss();
Vibrate.feedback(FeedbackType.error);
}
} catch (e) {
print("eeeeeeee$e");
// _cancelLoading();
......
......@@ -74,7 +74,7 @@ class ProductController extends GetxController {
final params = Get.parameters;
// detailId
if (controller1.text.isNotEmpty) {
if (controller1.text.isNotEmpty && controller2.text.isNotEmpty) {
// 包含${controller2.text}的${params['title']}
String str = "帮我写一篇${params['firstLabel']}${controller1.text}";
......@@ -104,28 +104,35 @@ class ProductController extends GetxController {
// json.encode(map);
String result = await NewsAPI.sendMessageByDetailId([
{
"label": params['firstLabel'],
"value": controller1.text,
"placeHolder": params['firstValue'],
"sort": 1,
},
{
"label": params['lastLabel'],
"value": controller2.text,
"placeHolder": params['lastValue'],
"sort": 2,
}
], params['detailId']!);
// state.genText = result;
state.messageQueenItemQueen.add(MessageQueenItem(
text: result.replaceAll('\n\n', ''),
isFinish: false,
isWhiteIng: true));
state.isWhite = true;
state.loading = false;
if (UserStore.to.isLogin) {
String result = await NewsAPI.sendMessageByDetailId([
{
"label": params['firstLabel'],
"value": controller1.text,
"placeHolder": params['firstValue'],
"sort": 1,
},
{
"label": params['lastLabel'],
"value": controller2.text,
"placeHolder": params['lastValue'],
"sort": 2,
}
], params['detailId']!);
// state.genText = result;
state.messageQueenItemQueen.add(MessageQueenItem(
text: result.replaceAll('\n\n', ''),
isFinish: false,
isWhiteIng: true));
state.isWhite = true;
state.loading = false;
} else {
EasyLoading.showError("你还未登录,请登录后再使用");
state.isWhite = false;
state.loading = false;
// Get.snackbar("错误提示", "您的问题还没有填完", colorText: Colors.white);
}
EasyLoading.dismiss();
} catch (e) {
state.loading = false;
......
This diff is collapsed.
......@@ -112,7 +112,7 @@ class WelcomePage extends GetView<WelcomeController> {
borderRadius: Radii.k6pxRadius,
)),
),
child: Text("开始"),
child: Text("开始使用"),
onPressed: controller.handleHome,
),
);
......@@ -121,32 +121,52 @@ class WelcomePage extends GetView<WelcomeController> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
children: <Widget>[
// Text("data")
_buildPageHeadTitle(),
_buildPageHeaderDetail(),
_buildFeatureItem(
"feature-1",
"Compelling photography and typography provide a beautiful reading",
86,
),
_buildFeatureItem(
"feature-2",
"Sector news never shares your personal data with advertisers or publishers",
40,
),
_buildFeatureItem(
"feature-3",
"You can get Premium to unlock hundreds of publications",
40,
),
Spacer(),
_buildStartButton(context),
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: Image.asset("assets/images/bg2.png").image,
fit: BoxFit.cover),
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 60),
child: Center(
child: Column(
children: [
Expanded(child: Text("")),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [_buildStartButton(context)],
)),
],
),
// mainAxisAlignment: MainAxisAlignment.end,
// children: [_buildStartButton(context)],
)),
// child: Column(
// children: <Widget>[
// Text("data")
// _buildPageHeadTitle(),
// _buildPageHeaderDetail(),
// _buildFeatureItem(
// "feature-1",
// "Compelling photography and typography provide a beautiful reading",
// 86,
// ),
// _buildFeatureItem(
// "feature-2",
// "Sector news never shares your personal data with advertisers or publishers",
// 40,
// ),
// _buildFeatureItem(
// "feature-3",
// "You can get Premium to unlock hundreds of publications",
// 40,
// ),
// Spacer(),
// ],
// ),
),
);
));
}
}
......@@ -33,21 +33,48 @@ class NewsCategoriesWidget extends GetView<MainController> {
children: [
// ignore: prefer_const_constructors
Obx(
() => Container(
width: 200,
child: Text(
"Hi, ${userC.profile.username}",
maxLines: 1,
textAlign: TextAlign.left,
overflow: TextOverflow.clip,
softWrap: true,
// ignore: prefer_const_constructors
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 20),
),
),
() => userC.isLogin
? Container(
width: 200,
child: Text(
// userC.isLogin
// ?
"Hi, ${userC.profile.username}",
// : "您还未登录",
maxLines: 1,
textAlign: TextAlign.left,
overflow: TextOverflow.clip,
softWrap: true,
// ignore: prefer_const_constructors
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 20),
),
)
: Container(
width: 200,
child: GestureDetector(
onTap: () {
Vibrate.feedback(FeedbackType.impact);
Get.toNamed(AppRoutes.SIGN_IN);
},
child: Text(
// userC.isLogin
// ?
"点我登录",
// : "您还未登录",
maxLines: 1,
textAlign: TextAlign.left,
overflow: TextOverflow.clip,
softWrap: true,
// ignore: prefer_const_constructors
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 20),
)),
),
),
SizedBox(height: 30),
// ignore: prefer_const_constructors
......@@ -63,7 +90,11 @@ class NewsCategoriesWidget extends GetView<MainController> {
// Get.toNamed(AppRoutes.SIGN_IN);
// AppRoutes.SIGN_IN
Vibrate.feedback(FeedbackType.impact);
Get.toNamed(AppRoutes.PAY_LIST);
if (userC.isLogin) {
Get.toNamed(AppRoutes.PAY_LIST);
} else {
Get.toNamed(AppRoutes.SIGN_IN);
}
},
// {Navigator.of(context).pushNamed('/pay')},
child: Container(
......
......@@ -93,16 +93,16 @@ class SiperBannerWidget extends GetView<MainController> {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 14),
child: GestureDetector(
onTap: () => {
// Navigator.of(context).pushNamed("/chat",
// arguments: {"question": message.question})
// 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}")
},
// // Navigator.push(context, MaterialPageRoute(builder: (context) {
// // return ChatPage();
// // }))
// // Navigator.of(context).pop({'id': "1"})
// // print("${message.question}")
// },
child: InkWell(
onTap: () {
Vibrate.feedback(FeedbackType.impact);
......
import 'package:chart/common/routers/routes.dart';
import 'package:chart/common/store/user.dart';
import 'package:flutter/material.dart';
import 'package:flutter_vibrate/flutter_vibrate.dart';
import 'package:get/get.dart';
import 'package:babstrap_settings_screen/babstrap_settings_screen.dart';
import 'package:glassmorphism/glassmorphism.dart';
......@@ -87,7 +88,9 @@ class UserDetailPage extends GetView<UserDetailController> {
height: 30,
// color: Colors.white,
child: Text(
'${c.profile.username}',
c.isLogin
? '${c.profile.username}'
: '未登录用户',
maxLines: 1,
textAlign: TextAlign.left,
overflow: TextOverflow.ellipsis,
......@@ -350,7 +353,12 @@ class UserDetailPage extends GetView<UserDetailController> {
// color: Colors.white,
child: SettingsItem(
onTap: () {
Get.toNamed(AppRoutes.PAY_LIST);
Vibrate.feedback(FeedbackType.impact);
if (c.isLogin) {
Get.toNamed(AppRoutes.PAY_LIST);
} else {
Get.toNamed(AppRoutes.SIGN_IN);
}
},
icons: Icons.account_balance_wallet_rounded,
iconStyle: IconStyle(iconsColor: Colors.white),
......@@ -488,27 +496,48 @@ class UserDetailPage extends GetView<UserDetailController> {
Color(0xFF0FFFF).withOpacity(1),
],
),
child: Container(
// color: Colors.white,
child: SettingsItem(
onTap: () {
// Get.toNamed(AppRoutes.SIGN_IN);
c.onLogout();
},
icons: Icons.logout,
iconStyle: IconStyle(
iconsColor: Colors.white,
backgroundColor: Colors.red,
),
titleStyle: TextStyle(color: Colors.white),
title: c.isLogin ? '退出登录' : '登录账号',
subtitle: "退出该登录账号",
trailing: Icon(
Icons.arrow_forward_ios_rounded,
color: Colors.white,
),
),
),
child: Obx(() => Container(
// color: Colors.white,
child: c.isLogin
? SettingsItem(
onTap: () {
// Get.toNamed(AppRoutes.SIGN_IN);
c.onLogout();
},
icons: Icons.logout,
iconStyle: IconStyle(
iconsColor: Colors.white,
backgroundColor: Colors.red,
),
titleStyle: TextStyle(color: Colors.red),
title: '退出登录',
// : '登录账号',
subtitle: "退出该登录账号",
trailing: Icon(
Icons.arrow_forward_ios_rounded,
color: Colors.white,
),
)
: SettingsItem(
onTap: () {
Get.toNamed(AppRoutes.SIGN_IN);
// c.onLogout();
},
icons: Icons.logout,
iconStyle: IconStyle(
iconsColor: Colors.white,
backgroundColor: Colors.red,
),
titleStyle: TextStyle(color: Colors.white),
title: '登录账号',
// : '登录账号',
subtitle: "登录账号使用",
trailing: Icon(
Icons.arrow_forward_ios_rounded,
color: Colors.white,
),
),
)),
),
// SettingsGroup(
// items: [
......
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