circle_app/circle_app/lib/app/call_out/view.dart
2023-06-14 16:24:05 +08:00

177 lines
7.4 KiB
Dart

import 'package:circle_app/components/my_app_bar.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'logic.dart';
class Call_outPage extends StatelessWidget {
Call_outPage({Key? key}) : super(key: key);
final logic = Get.find<Call_outLogic>();
final state = Get.find<Call_outLogic>().state;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
},
child: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
centerTitle: '世界喊话',
actionWdiget: Image.asset(
getCircleImage('push'),
width: 54.sp,
),
onPressed: () {
showToast('111');
},
),
body: SafeArea(
child: GetBuilder(builder: (Call_outLogic controller) {
return Container(
child: Column(
children: [
Container(
height: 45.sp,
padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
child: Row(
children: [
Text(
'选择圈子:',
style:
TextStyle(color: Colors.white, fontSize: 16.sp),
),
Expanded(child: Container()),
Container(
padding: EdgeInsets.only(left: 7.sp, right: 7.sp),
height: 21.sp,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(21 * 0.5.sp),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xff0AFCFF),
Color(0xffD739EA)
])),
child: Text(
'立即解锁',
style: TextStyle(
color: Colors.white, fontSize: 12.sp),
),
),
Image.asset(
getHomeImage('icon_in'),
width: 24.sp,
),
],
),
),
Image.asset(
getCircleImage('line'),
width: Get.width,
fit: BoxFit.fill,
),
Expanded(child: Container(
padding: EdgeInsets.only(top: 15.sp),
child: Stack(
children: [
TextField(
controller: controller.textEditingController,
onChanged: (value) {
controller.update();
},
style: TextStyle(color: Colors.white,fontSize: 14.0.sp),
maxLines: 32,
maxLength: 200,
decoration: InputDecoration(
hintStyle: TextStyle(color: Color.fromRGBO(255, 255, 255, 0.6),fontSize: 14.sp),
hintText: '请输入...(左下角上传图片或视频哦)',
border: InputBorder.none,
contentPadding: EdgeInsets.only(left: 17.sp,right: 17.sp),
counter: Text('')
),
),
Positioned(
right: 15.sp,
bottom: 10.sp,
child: Text('${controller.textEditingController.text.length}/200',style: TextStyle(color: Colors.white,fontSize: 12.sp),))
],
),
)),
Container(
padding: EdgeInsets.only(left: 17.sp,right: 17.sp),
child: Row(
children: [
GestureDetector(
child: Image.asset(
getCircleImage('photo'),
width: 30.sp,
),
),
const SizedBox(
width: 16,
),
GestureDetector(
child: Image.asset(
getCircleImage('video'),
width: 30.sp,
),
),
Expanded(
child: GestureDetector(
onTap: () {
controller.isCheck = !controller.isCheck;
controller.update();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(getCircleImage(controller.isCheck ? 'check' : 'uncheck'),width: 17.5.sp,),
SizedBox(
width: 4.sp,
),
Text(
'使用至尊喊话',
style: TextStyle(
color: Colors.white, fontSize: 16.sp),
)
],
),
),
),
GestureDetector(
child: Text(
'内容规范',
style: TextStyle(
color: Color(0xff00FFF4), fontSize: 14.sp),
),
)
],
),
)
],
),
);
}),
),
)),
);
;
}
}