Commit 24ec97a4 authored by 关振斌's avatar 关振斌

update

parent d66f0f4f
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<dict> <dict>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:www.fusiontech.cn/</string> <string>applinks:www.hahagpt.com/app/</string>
</array> </array>
</dict> </dict>
</plist> </plist>
...@@ -3,14 +3,17 @@ part of dash_chat_2; ...@@ -3,14 +3,17 @@ part of dash_chat_2;
/// {@category Default widgets} /// {@category Default widgets}
InputDecoration defaultInputDecoration( InputDecoration defaultInputDecoration(
void Function() sendMessage, { void Function() sendMessage,
bool bool, {
String hintText = '请输入问题...', String hintText = '请输入问题...',
TextStyle hintStyle = const TextStyle(color: Colors.grey), TextStyle hintStyle = const TextStyle(color: Colors.grey),
Color? fillColor, Color? fillColor,
bool inputDisabled = true,
}) => }) =>
InputDecoration( InputDecoration(
isDense: true, isDense: true,
hintText: hintText,
hintText: !inputDisabled ? 'AI正在输入中...' : hintText,
hintStyle: hintStyle, hintStyle: hintStyle,
filled: true, filled: true,
// fillColor: fillColor ?? Colors.grey[100], // fillColor: fillColor ?? Colors.grey[100],
......
...@@ -100,7 +100,13 @@ class _InputToolbarState extends State<InputToolbar> ...@@ -100,7 +100,13 @@ class _InputToolbarState extends State<InputToolbar>
textCapitalization: widget.inputOptions.textCapitalization, textCapitalization: widget.inputOptions.textCapitalization,
textInputAction: widget.inputOptions.textInputAction, textInputAction: widget.inputOptions.textInputAction,
decoration: widget.inputOptions.inputDecoration ?? decoration: widget.inputOptions.inputDecoration ??
defaultInputDecoration(_sendMessage), defaultInputDecoration(
_sendMessage,
hintText: widget.inputOptions.inputDisabled
? 'AI正在输入中...'
: '请输入问题...',
!widget.inputOptions.inputDisabled,
),
maxLength: widget.inputOptions.maxInputLength, maxLength: widget.inputOptions.maxInputLength,
minLines: 1, minLines: 1,
maxLines: 1, maxLines: 1,
......
...@@ -77,7 +77,9 @@ class AssistantItemController extends GetxController { ...@@ -77,7 +77,9 @@ class AssistantItemController extends GetxController {
"question": message.text, "question": message.text,
"sceneId": state.selectItem['sceneId'], "sceneId": state.selectItem['sceneId'],
}); });
} catch (e) {} } catch (e) {
state.isLoading = false;
}
// final loadingMessage = types.TextMessage( // final loadingMessage = types.TextMessage(
// author: receiveUser, // author: receiveUser,
...@@ -93,15 +95,16 @@ class AssistantItemController extends GetxController { ...@@ -93,15 +95,16 @@ class AssistantItemController extends GetxController {
SSEClient.subscribeToSSE( SSEClient.subscribeToSSE(
url: "$SERVER_API_URL/openAi/connect/${UserStore.to.profile.id}", url: "$SERVER_API_URL/openAi/connect/${UserStore.to.profile.id}",
header: {}).listen((event) async { header: {}).listen((event) async {
print(event);
if (event.data!.trim().isEmpty) { if (event.data!.trim().isEmpty) {
return; return;
} else if (event.id == "[DONE]") { } else if (event.id == "[DONE]") {
print('event.id${event.id}');
state.isLoading = false;
await UserAPI.saveResp({ await UserAPI.saveResp({
"conversionId": state.actId, "conversionId": state.actId,
"content": state.messageList[0].text, "content": state.messageList[0].text,
}); });
state.isLoading = false;
return; return;
} }
Map<String, dynamic> jsonMap = jsonDecode("${event.data}"); Map<String, dynamic> jsonMap = jsonDecode("${event.data}");
......
...@@ -49,36 +49,36 @@ class AssistantItemPage extends GetView<AssistantItemController> { ...@@ -49,36 +49,36 @@ class AssistantItemPage extends GetView<AssistantItemController> {
])), ])),
), ),
body: KeyboardVisibilityBuilder(builder: (context, visible) { body: KeyboardVisibilityBuilder(builder: (context, visible) {
return Chat.DashChat( return Obx(() => Chat.DashChat(
inputOptions: Chat.InputOptions( inputOptions: Chat.InputOptions(
textInputAction: TextInputAction.send, textInputAction: TextInputAction.send,
sendOnEnter: true, sendOnEnter: true,
// showTraillingBeforeSend: true, // showTraillingBeforeSend: true,
// inputDisabled: cc.state.isLoading, inputDisabled: cc.state.isLoading,
inputTextStyle: TextStyle(color: Colors.white), inputTextStyle: TextStyle(color: Colors.white),
inputToolbarStyle: BoxDecoration( inputToolbarStyle: BoxDecoration(
color: Color.fromARGB(120, 0, 0, 0), color: Color.fromARGB(120, 0, 0, 0),
// Color.fromARGB(0, 54, 59, 72), // Color.fromARGB(0, 54, 59, 72),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(16), topLeft: Radius.circular(16),
topRight: Radius.circular(16)), topRight: Radius.circular(16)),
), ),
inputToolbarMargin: EdgeInsets.all(0), inputToolbarMargin: EdgeInsets.all(0),
sendButtonBuilder: null, sendButtonBuilder: null,
inputToolbarPadding: EdgeInsets.only( inputToolbarPadding: EdgeInsets.only(
top: 15, top: 15,
right: 15, right: 15,
left: 15, left: 15,
bottom: visible ? 15 : 50), bottom: visible ? 15 : 50),
), ),
currentUser: _user, currentUser: _user,
onSend: cc.sendMessage, onSend: cc.sendMessage,
messages: cc.state.messageList, messages: cc.state.messageList,
messageOptions: Chat.MessageOptions( messageOptions: Chat.MessageOptions(
onPressMessage: cc.tabMessage, onPressMessage: cc.tabMessage,
// containerColor: Colors.black, // containerColor: Colors.black,
), ),
); ));
})), })),
)); ));
} }
......
...@@ -38,6 +38,7 @@ class AssistantController extends GetxController { ...@@ -38,6 +38,7 @@ class AssistantController extends GetxController {
'sceneId': item.id 'sceneId': item.id
}; };
AssistantItemController.to.state.messageList.clear(); AssistantItemController.to.state.messageList.clear();
AssistantItemController.to.state.isLoading = false;
// CreationDetailController.to // CreationDetailController.to
// .updateState('${item.id}', item.detailName, res.data!); // .updateState('${item.id}', item.detailName, res.data!);
Get.toNamed(AppRoutes.ASSISTANT_ITEM); Get.toNamed(AppRoutes.ASSISTANT_ITEM);
......
...@@ -60,29 +60,22 @@ class GridWidget extends GetView<AssistantController> { ...@@ -60,29 +60,22 @@ class GridWidget extends GetView<AssistantController> {
delegate: SliverChildBuilderDelegate( delegate: SliverChildBuilderDelegate(
(context, index) { (context, index) {
return Container( return Container(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 10, left: 10,
right: 10, right: 10,
), ),
margin: const EdgeInsets.only( margin: const EdgeInsets.only(
top: 10, top: 10,
bottom: 20, bottom: 20,
), ),
child: Obx(() => StaggeredGrid.count( child: Obx(() => Column(
crossAxisCount: 1, children: controller.sceneList.map((element) {
mainAxisSpacing: 20, return Container(
crossAxisSpacing: 10, margin: EdgeInsets.only(bottom: 20),
children: List.generate(controller.sceneList.length, (index) { child: InkWell(
return StaggeredGridTile.count(
crossAxisCellCount: 1,
mainAxisCellCount: 0.31,
child: Container(
// margin: EdgeInsets.only(bottom: 20),
child: InkWell(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
onTap: () { onTap: () {
controller.onTap(controller.sceneList[index]); controller.onTap(element);
}, },
child: Ink( child: Ink(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
...@@ -101,6 +94,8 @@ class GridWidget extends GetView<AssistantController> { ...@@ -101,6 +94,8 @@ class GridWidget extends GetView<AssistantController> {
]), ]),
), ),
child: Row( child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
ClipRRect( ClipRRect(
borderRadius: BorderRadius.circular(40), borderRadius: BorderRadius.circular(40),
...@@ -111,8 +106,7 @@ class GridWidget extends GetView<AssistantController> { ...@@ -111,8 +106,7 @@ class GridWidget extends GetView<AssistantController> {
Duration(milliseconds: 500), Duration(milliseconds: 500),
placeholder: const AssetImage( placeholder: const AssetImage(
'assets/images/loading.gif'), // 加载指示器 'assets/images/loading.gif'), // 加载指示器
image: NetworkImage( image: NetworkImage('${element.icon}'),
'${controller.sceneList[index].icon}'),
// image: NetworkImage( // image: NetworkImage(
// 'https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.pinterest.com%2Fpin%2Fai-visualization-design-fui-artificial-intelligence-siri-filter-ai-loading-logo-flow-light--400538960609301125%2F&psig=AOvVaw0X4iFGabqA_JwUiW9zEG4u&ust=1680859399497000&source=images&cd=vfe&ved=0CA8QjRxqFwoTCLiAnK33lP4CFQAAAAAdAAAAABAb'), // 图像URL // 'https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.pinterest.com%2Fpin%2Fai-visualization-design-fui-artificial-intelligence-siri-filter-ai-loading-logo-flow-light--400538960609301125%2F&psig=AOvVaw0X4iFGabqA_JwUiW9zEG4u&ust=1680859399497000&source=images&cd=vfe&ved=0CA8QjRxqFwoTCLiAnK33lP4CFQAAAAAdAAAAABAb'), // 图像URL
fit: BoxFit.cover, // 图像适应方式 fit: BoxFit.cover, // 图像适应方式
...@@ -120,7 +114,7 @@ class GridWidget extends GetView<AssistantController> { ...@@ -120,7 +114,7 @@ class GridWidget extends GetView<AssistantController> {
), ),
), ),
// Image.network( // Image.network(
// controller.sceneList[index].icon), // element.icon),
Expanded( Expanded(
child: Container( child: Container(
// color: Colors.red, // color: Colors.red,
...@@ -128,6 +122,8 @@ class GridWidget extends GetView<AssistantController> { ...@@ -128,6 +122,8 @@ class GridWidget extends GetView<AssistantController> {
left: 10, left: 10,
), ),
child: Column( child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceAround, MainAxisAlignment.spaceAround,
children: [ children: [
...@@ -136,9 +132,7 @@ class GridWidget extends GetView<AssistantController> { ...@@ -136,9 +132,7 @@ class GridWidget extends GetView<AssistantController> {
MainAxisAlignment MainAxisAlignment
.spaceBetween, .spaceBetween,
children: [ children: [
Text(controller Text(element.sceneName),
.sceneList[index]
.sceneName),
GradientButton( GradientButton(
child: Text('咨询', child: Text('咨询',
style: TextStyle( style: TextStyle(
...@@ -146,9 +140,7 @@ class GridWidget extends GetView<AssistantController> { ...@@ -146,9 +140,7 @@ class GridWidget extends GetView<AssistantController> {
increaseHeightBy: -5.00, increaseHeightBy: -5.00,
increaseWidthBy: -10.00, increaseWidthBy: -10.00,
callback: () { callback: () {
controller.onTap( controller.onTap(element);
controller.sceneList[
index]);
}, },
// controller.requestPurchase, // controller.requestPurchase,
gradient: gradient:
...@@ -174,8 +166,7 @@ class GridWidget extends GetView<AssistantController> { ...@@ -174,8 +166,7 @@ class GridWidget extends GetView<AssistantController> {
// .withOpacity(0.25), // .withOpacity(0.25),
) )
]), ]),
Text( Text("${element.sceneDesc}",
"${controller.sceneList[index].sceneDesc}",
maxLines: 2, maxLines: 2,
textAlign: TextAlign.left, textAlign: TextAlign.left,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
...@@ -185,11 +176,50 @@ class GridWidget extends GetView<AssistantController> { ...@@ -185,11 +176,50 @@ class GridWidget extends GetView<AssistantController> {
) )
], ],
), ),
)), ),
), ),
); );
}).toList())), }).toList(),
); ))
// Obx(() => StaggeredGrid.count(
// crossAxisCount: 1,
// mainAxisSpacing: 20,
// crossAxisSpacing: 10,
// children: List.generate(controller.sceneList.length, (index) {
// return StaggeredGridTile.count(
// crossAxisCellCount: 1,
// mainAxisCellCount: 0.31,
// child: Container(
// // margin: EdgeInsets.only(bottom: 20),
// child: InkWell(
// borderRadius: BorderRadius.circular(10),
// onTap: () {
// controller.onTap(element);
// },
// child: Ink(
// padding: EdgeInsets.all(10),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// // ignore: prefer_const_constructors
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// // background-image: linear-gradient(180deg, #3d3f54, #333450, #2b2b4d);
// colors: const [
// Color(0xFF3d3f54),
// Color(0xFF333450),
// Color(0xFF2b2b4d)
// ]),
// ),
// child: ,
// )),
// ),
// );
// }).toList())),
);
}, },
childCount: 1, childCount: 1,
)) ))
......
...@@ -96,7 +96,7 @@ class GridWidget extends GetView<CreationController> { ...@@ -96,7 +96,7 @@ class GridWidget extends GetView<CreationController> {
}, },
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceEvenly,
children: [ children: [
Padding( Padding(
padding: padding:
......
...@@ -60,10 +60,16 @@ class PayListController extends GetxController { ...@@ -60,10 +60,16 @@ class PayListController extends GetxController {
@override @override
void onInit() async { void onInit() async {
super.onInit(); super.onInit();
await initializedPlugins(); try {
EasyLoading.show(status: "正在获取套餐中..."); await initializedPlugins();
await _getProduct(); EasyLoading.show(status: "正在获取套餐中...");
EasyLoading.dismiss(); state.loadingList = true;
await _getProduct();
state.loadingList = false;
EasyLoading.dismiss();
} catch (e) {
state.loadingList = false;
}
// await initializedPlugins(); // await initializedPlugins();
// new 对象 // new 对象
// 初始静态数据 // 初始静态数据
...@@ -77,9 +83,7 @@ class PayListController extends GetxController { ...@@ -77,9 +83,7 @@ class PayListController extends GetxController {
// setState to update our non-existent appearance. // setState to update our non-existent appearance.
_conectionSubscription = _conectionSubscription =
FlutterInappPurchase.connectionUpdated.listen((connected) { FlutterInappPurchase.connectionUpdated.listen((connected) {});
print('connected: $connected');
});
_purchaseUpdatedSubscription = _purchaseUpdatedSubscription =
FlutterInappPurchase.purchaseUpdated.listen((productItem) async { FlutterInappPurchase.purchaseUpdated.listen((productItem) async {
...@@ -87,12 +91,14 @@ class PayListController extends GetxController { ...@@ -87,12 +91,14 @@ class PayListController extends GetxController {
'receipt': productItem?.transactionReceipt, 'receipt': productItem?.transactionReceipt,
'userId': UserStore.to.profile.id, 'userId': UserStore.to.profile.id,
'productId': productItem!.productId, 'productId': productItem!.productId,
"chooseEnv": false "chooseEnv": false,
"transactionId": productItem.transactionId,
// "transactionDate": productItem.transactionDate!.toIso8601String(),
}); });
if (res?.status == 200) { if (res?.status == 200) {
state.loading = false; state.loading = false;
EasyLoading.showSuccess('${res?.message}'); EasyLoading.showSuccess(res.message);
Vibrate.feedback(FeedbackType.success); Vibrate.feedback(FeedbackType.success);
EasyLoading.dismiss(); EasyLoading.dismiss();
UserAPI.getUserInfo().then((value) async { UserAPI.getUserInfo().then((value) async {
...@@ -163,7 +169,7 @@ class PayListController extends GetxController { ...@@ -163,7 +169,7 @@ class PayListController extends GetxController {
// print("${item.productId}"); // print("${item.productId}");
// 处理以前购买的产品 // 处理以前购买的产2
} }
} }
......
...@@ -15,5 +15,9 @@ class PayListState { ...@@ -15,5 +15,9 @@ class PayListState {
set loading(value) => _loading.value = value; set loading(value) => _loading.value = value;
get loading => _loading.value; get loading => _loading.value;
final _loadingList = false.obs;
set loadingList(value) => _loadingList.value = value;
get loadingList => _loadingList.value;
RxList<IAPItem> items = <IAPItem>[].obs; RxList<IAPItem> items = <IAPItem>[].obs;
} }
import 'dart:math'; import 'dart:math';
import 'package:card_swiper/card_swiper.dart';
import 'package:chart/common/routers/names.dart'; import 'package:chart/common/routers/names.dart';
import 'package:chart/common/store/user.dart'; import 'package:chart/common/store/user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
...@@ -21,13 +22,13 @@ const color = Color(0xff8AFBFF); ...@@ -21,13 +22,13 @@ const color = Color(0xff8AFBFF);
class PayItemWidget extends GetView<PayListController> { class PayItemWidget extends GetView<PayListController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Random random = new Random(); // Random random = new Random();
// List<Bullet> bullets = []; // List<Bullet> bullets = [];
List<Bullet> bullets = List<Bullet>.generate(1000, (i) { // List<Bullet> bullets = List<Bullet>.generate(1000, (i) {
final showTime = random.nextInt(60000); // in 60s // final showTime = random.nextInt(60000); // in 60s
return Bullet(child: Text('$i-$showTime'), showTime: showTime); // return Bullet(child: Text('$i-$showTime'), showTime: showTime);
}); // });
final barrageWallController = BarrageWallController(); final barrageWallController = BarrageWallController();
final textEditingController = TextEditingController(); final textEditingController = TextEditingController();
// final textEditingController = TextEditingController(); // final textEditingController = TextEditingController();
...@@ -38,13 +39,16 @@ class PayItemWidget extends GetView<PayListController> { ...@@ -38,13 +39,16 @@ class PayItemWidget extends GetView<PayListController> {
child: ListView( child: ListView(
children: [ children: [
Obx(() => c.profile.expireTime == null Obx(() => c.profile.expireTime == null
? const Text( ? const Center(
"您还不是 VIP 会员", child: Text(
style: TextStyle( "您还不是 VIP 会员",
color: Color.fromARGB(255, 160, 165, 184), style: TextStyle(
fontSize: 14, color: Color.fromARGB(255, 160, 165, 184),
fontSize: 14,
),
), ),
) )
// 那俄语呢 那他的反义词呢
: Align( : Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Container( child: Container(
...@@ -266,7 +270,7 @@ class PayItemWidget extends GetView<PayListController> { ...@@ -266,7 +270,7 @@ class PayItemWidget extends GetView<PayListController> {
255, 241, 197, 131)), 255, 241, 197, 131)),
), ),
Text( Text(
${(int.parse(element.price!) * 1.2).toInt()}', ${(double.parse(element.price!) * 1.2).toStringAsFixed(2)}',
style: TextStyle( style: TextStyle(
color: color:
Color.fromARGB(255, 140, 145, 151), Color.fromARGB(255, 140, 145, 151),
...@@ -540,54 +544,45 @@ class PayItemWidget extends GetView<PayListController> { ...@@ -540,54 +544,45 @@ class PayItemWidget extends GetView<PayListController> {
])) ]))
], ],
)), )),
Container(
padding: const EdgeInsets.only(
top: 10,
bottom: 50,
),
decoration: BoxDecoration(
color: const Color(0xFF3d3f54).withOpacity(.8),
// gradient: const LinearGradient(
// colors: [Color(0xFF3d3f54), Color(0xFF333450), Color(0xFF2b2b4d)],
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// )
),
width: Get.width,
child: Obx(
() => GradientButton(
increaseHeightBy: 10.00,
increaseWidthBy: Get.width * .7,
callback: () {
controller.requestPurchase();
},
isEnabled: !controller.state.loading,
// callback: controller.genInner,
shapeRadius: const BorderRadius.all(Radius.circular(5)),
// controller.requestPurchase,
// gradient: Gradients.cosmicFusion,
// background-image: linear-gradient(180deg, #3d3f54, #333450, #2b2b4d);
elevation: 0,
gradient: const LinearGradient(
colors: [
// 61, 63, 84
// 180deg, // loadingList
// #be6afb, Obx(() => AnimatedOpacity(
// #9c67f6, opacity: controller.state.loadingList ? 0 : 1,
// #7965f8 duration: const Duration(milliseconds: 500),
Color(0xFFbe6afb), child: Container(
Color(0xFF9c67f6), padding: const EdgeInsets.only(
Color(0xFF7965f8) top: 10,
], bottom: 50,
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
), ),
child: const Text('立即解锁', decoration: BoxDecoration(
style: color: const Color(0xFF3d3f54).withOpacity(.8),
TextStyle(fontSize: 14, fontWeight: FontWeight.w500)), ),
), width: Get.width,
)) child: Obx(
() => GradientButton(
increaseHeightBy: 10.00,
increaseWidthBy: Get.width * .7,
callback: () {
controller.requestPurchase();
},
isEnabled: !controller.state.loading,
// callback: controller.genInner,
shapeRadius: const BorderRadius.all(Radius.circular(5)),
elevation: 0,
gradient: const LinearGradient(
colors: [
Color(0xFFbe6afb),
Color(0xFF9c67f6),
Color(0xFF7965f8)
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
child: const Text('立即解锁',
style: TextStyle(
fontSize: 14, fontWeight: FontWeight.w500)),
),
))))
], ],
); );
} }
......
...@@ -335,14 +335,15 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin { ...@@ -335,14 +335,15 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
} }
reset() async { reset() async {
rotateIcon(); await rotateIcon();
try { try {
await UserAPI.resetConversion(); await UserAPI.resetConversion();
EasyLoading.showToast('重置成功'); EasyLoading.showToast('已将对话上下文重置!', maskType: EasyLoadingMaskType.none);
} catch (e) {} } catch (e) {}
} }
virtualPay(){ virtualPay() {
if (GetPlatform.isAndroid) { if (GetPlatform.isAndroid) {
Get.toNamed(AppRoutes.AN_PAY_LIST); Get.toNamed(AppRoutes.AN_PAY_LIST);
} else { } else {
...@@ -406,14 +407,15 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin { ...@@ -406,14 +407,15 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
Animation<double> get animation => _animation; Animation<double> get animation => _animation;
void rotateIcon() { Future rotateIcon() {
if (_isRotated) { if (_isRotated) {
_controller.reverse(); _controller.repeat();
} else { } else {
_controller.forward(); _controller.repeat();
} }
_isRotated = !_isRotated; _isRotated = !_isRotated;
update();
return Future.delayed(Duration(seconds: 2), () => _controller.stop());
} }
///dispose 释放内存 ///dispose 释放内存
......
...@@ -96,7 +96,7 @@ class HomePage extends GetView<HomeController> { ...@@ -96,7 +96,7 @@ class HomePage extends GetView<HomeController> {
color: Color.fromARGB(255, 95, 54, 0), color: Color.fromARGB(255, 95, 54, 0),
fontSize: 16)), fontSize: 16)),
]), ]),
callback:()=> controller.virtualPay()), callback: () => controller.virtualPay()),
), ),
body: SizedBox( body: SizedBox(
width: double.infinity, width: double.infinity,
...@@ -107,14 +107,16 @@ class HomePage extends GetView<HomeController> { ...@@ -107,14 +107,16 @@ class HomePage extends GetView<HomeController> {
// color: Color.fromARGB(0, 29, 33, 60), // color: Color.fromARGB(0, 29, 33, 60),
// color: Color.fromARGB(255, 26, 27, 46), // color: Color.fromARGB(255, 26, 27, 46),
child: Chat.DashChat( child: Chat.DashChat(
inputOptions: const Chat.InputOptions( inputOptions: Chat.InputOptions(
textInputAction: TextInputAction.send, textInputAction: TextInputAction.send,
inputDisabled: cc.state.isLoading,
sendOnEnter: true, sendOnEnter: true,
// showTraillingBeforeSend: true, // showTraillingBeforeSend: true,
// inputDisabled: cc.state.isLoading, // inputDisabled: cc.state.isLoading,
inputTextStyle: TextStyle(color: Colors.white), inputTextStyle: TextStyle(color: Colors.white),
inputToolbarStyle: BoxDecoration( inputToolbarStyle: BoxDecoration(
color: Color.fromARGB(120, 0, 0, 0), color: Color.fromARGB(120, 0, 0, 0),
// Color.fromARGB(0, 54, 59, 72), // Color.fromARGB(0, 54, 59, 72),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(16), topLeft: Radius.circular(16),
...@@ -130,6 +132,7 @@ class HomePage extends GetView<HomeController> { ...@@ -130,6 +132,7 @@ class HomePage extends GetView<HomeController> {
messages: cc.state.messageList, messages: cc.state.messageList,
messageOptions: Chat.MessageOptions( messageOptions: Chat.MessageOptions(
onPressMessage: cc.tabMessage, onPressMessage: cc.tabMessage,
onLongPressMessage: (mes) => {},
// containerColor: Colors.black, // containerColor: Colors.black,
), ),
), ),
......
...@@ -16,11 +16,13 @@ class MyPage extends GetView<MyController> { ...@@ -16,11 +16,13 @@ class MyPage extends GetView<MyController> {
padding: EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10),
children: [ children: [
Obx(() => c.profile.expireTime == null Obx(() => c.profile.expireTime == null
? const Text( ? const Center(
"您还不是 VIP 会员", child: Text(
style: TextStyle( "您还不是 VIP 会员",
color: Color.fromARGB(255, 160, 165, 184), style: TextStyle(
fontSize: 14, color: Color.fromARGB(255, 160, 165, 184),
fontSize: 14,
),
), ),
) )
: Align( : Align(
...@@ -64,6 +66,7 @@ class MyPage extends GetView<MyController> { ...@@ -64,6 +66,7 @@ class MyPage extends GetView<MyController> {
Container( Container(
margin: EdgeInsets.only(top: 20), margin: EdgeInsets.only(top: 20),
child: InkWell( child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: () { onTap: () {
Get.toNamed(AppRoutes.PAY_LIST); Get.toNamed(AppRoutes.PAY_LIST);
}, },
...@@ -102,6 +105,7 @@ class MyPage extends GetView<MyController> { ...@@ -102,6 +105,7 @@ class MyPage extends GetView<MyController> {
Container( Container(
margin: EdgeInsets.only(top: 20), margin: EdgeInsets.only(top: 20),
child: InkWell( child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: () { onTap: () {
Get.toNamed(AppRoutes.USER_EULA); Get.toNamed(AppRoutes.USER_EULA);
}, },
...@@ -140,6 +144,7 @@ class MyPage extends GetView<MyController> { ...@@ -140,6 +144,7 @@ class MyPage extends GetView<MyController> {
Container( Container(
margin: EdgeInsets.only(top: 20), margin: EdgeInsets.only(top: 20),
child: InkWell( child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: () { onTap: () {
Get.toNamed(AppRoutes.PRIVACT); Get.toNamed(AppRoutes.PRIVACT);
}, },
...@@ -174,6 +179,9 @@ class MyPage extends GetView<MyController> { ...@@ -174,6 +179,9 @@ class MyPage extends GetView<MyController> {
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15),
), ),
), ),
),
Container(
child: Text("12"),
) )
// GradientButton(child: Text("321"), callback: () {}) // GradientButton(child: Text("321"), callback: () {})
], ],
......
...@@ -16,6 +16,7 @@ import share_plus ...@@ -16,6 +16,7 @@ import share_plus
import shared_preferences_foundation import shared_preferences_foundation
import sign_in_with_apple import sign_in_with_apple
import smart_auth import smart_auth
import speech_to_text_macos
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
...@@ -31,6 +32,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ...@@ -31,6 +32,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin")) SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
SmartAuthPlugin.register(with: registry.registrar(forPlugin: "SmartAuthPlugin")) SmartAuthPlugin.register(with: registry.registrar(forPlugin: "SmartAuthPlugin"))
SpeechToTextMacosPlugin.register(with: registry.registrar(forPlugin: "SpeechToTextMacosPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
} }
...@@ -1202,6 +1202,27 @@ packages: ...@@ -1202,6 +1202,27 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.0" version: "1.9.0"
speech_to_text:
dependency: "direct main"
description:
name: speech_to_text
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.1"
speech_to_text_macos:
dependency: transitive
description:
name: speech_to_text_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
speech_to_text_platform_interface:
dependency: transitive
description:
name: speech_to_text_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
sqflite: sqflite:
dependency: transitive dependency: transitive
description: description:
......
...@@ -125,6 +125,7 @@ dependencies: ...@@ -125,6 +125,7 @@ dependencies:
clipboard: ^0.1.3 clipboard: ^0.1.3
flutter_tts: ^3.6.3 flutter_tts: ^3.6.3
custom_pop_up_menu: ^1.2.4 custom_pop_up_menu: ^1.2.4
speech_to_text: ^6.1.1
# package:bubble/bubble.dart # package:bubble/bubble.dart
......
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