喊话UI实现

This commit is contained in:
CYH 2023-06-14 16:24:05 +08:00
parent 001aef310a
commit 89e2d10089
16 changed files with 502 additions and 258 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -1,7 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'state.dart'; import 'state.dart';
class Call_outLogic extends GetxController { class Call_outLogic extends GetxController {
final Call_outState state = Call_outState(); final Call_outState state = Call_outState();
TextEditingController textEditingController = TextEditingController();
bool isCheck = false;
} }

View File

@ -1,4 +1,7 @@
import 'package:circle_app/components/my_app_bar.dart';
import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'logic.dart'; import 'logic.dart';
@ -11,6 +14,163 @@ class Call_outPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container(); 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),
),
)
],
),
)
],
),
);
}),
),
)),
);
;
} }
} }

View File

@ -1,5 +1,4 @@
import 'package:circle_app/router/app_routers.dart';
import 'package:circle_app/util/util.dart'; import 'package:circle_app/util/util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -175,7 +174,6 @@ class CirclePage extends StatelessWidget {
margin: EdgeInsets.only(left: index > 0 ? 4.sp : 0, right: 4.sp), margin: EdgeInsets.only(left: index > 0 ? 4.sp : 0, right: 4.sp),
child: Stack( child: Stack(
children: [ children: [
ClipRRect( ClipRRect(
borderRadius: BorderRadius.circular(10.sp), borderRadius: BorderRadius.circular(10.sp),
child: SizedBox( child: SizedBox(
@ -191,7 +189,7 @@ class CirclePage extends StatelessWidget {
margin: EdgeInsets.only(top: 72.sp), margin: EdgeInsets.only(top: 72.sp),
child: ListView.builder( child: ListView.builder(
itemCount: 3, itemCount: 3,
itemBuilder: (context,index) { itemBuilder: (context, index) {
if (index == 0) { if (index == 0) {
return Container( return Container(
padding: EdgeInsets.only(left: 12.sp, right: 12.sp), padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
@ -199,8 +197,8 @@ class CirclePage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: image: AssetImage(
AssetImage(getCircleImage('circle_desc')))), getCircleImage('circle_desc')))),
child: Column( child: Column(
children: [ children: [
Container( Container(
@ -208,8 +206,10 @@ class CirclePage extends StatelessWidget {
child: RichText( child: RichText(
overflow: TextOverflow.fade, overflow: TextOverflow.fade,
maxLines: 2, maxLines: 2,
text: TextSpan( text: TextSpan(children: <InlineSpan>[
children: <InlineSpan>[descSpan, span])), descSpan,
span
])),
), ),
Container( Container(
child: Row( child: Row(
@ -218,7 +218,8 @@ class CirclePage extends StatelessWidget {
children: [ children: [
Container( Container(
height: 30.sp, height: 30.sp,
width: 30.0 + 15 * (widgets.length - 1), width: 30.0 +
15 * (widgets.length - 1),
child: Stack( child: Stack(
children: widgets, children: widgets,
), ),
@ -229,7 +230,8 @@ class CirclePage extends StatelessWidget {
Text( Text(
'3.5万圈友', '3.5万圈友',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 12.sp), color: Colors.white,
fontSize: 12.sp),
), ),
SizedBox( SizedBox(
width: 8.sp, width: 8.sp,
@ -263,8 +265,8 @@ class CirclePage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: AssetImage( image:
getCircleImage('top_circle_bg')))), AssetImage(getCircleImage('top_circle_bg')))),
child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -276,8 +278,7 @@ class CirclePage extends StatelessWidget {
), ),
Expanded( Expanded(
child: Container( child: Container(
padding: padding: EdgeInsets.only(left: 8.sp, top: 12.sp),
EdgeInsets.only(left: 8.sp, top: 12.sp),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
height: 72.sp, height: 72.sp,
child: Column( child: Column(
@ -304,7 +305,8 @@ class CirclePage extends StatelessWidget {
)), )),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Get.bottomSheet(tipWdiget(),isScrollControlled:true,enableDrag:false); Get.bottomSheet(tipWdiget(),
isScrollControlled: true, enableDrag: false);
}, },
child: Image.asset( child: Image.asset(
getCircleImage('add'), getCircleImage('add'),
@ -317,11 +319,18 @@ class CirclePage extends StatelessWidget {
Positioned( Positioned(
bottom: 56.sp, bottom: 56.sp,
right: 0.sp, right: 0.sp,
child: GestureDetector(child: Image.asset(getCircleImage('send_msg'),width: 60.sp,))) child: GestureDetector(
onTap: () {
Get.toNamed(AppRoutes.Call_out);
},
child: Image.asset(
getCircleImage('send_msg'),
width: 60.sp,
)))
], ],
))); )));
} }
/// ///
vipDynamicItem() { vipDynamicItem() {
Text descText = Text( Text descText = Text(
@ -439,7 +448,7 @@ class CirclePage extends StatelessWidget {
EdgeInsets.only(left: 6.sp, right: 6.sp), EdgeInsets.only(left: 6.sp, right: 6.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(9.sp), borderRadius: BorderRadius.circular(9.sp),
gradient:const LinearGradient( gradient: const LinearGradient(
begin: Alignment(0.25, 0.5), begin: Alignment(0.25, 0.5),
end: Alignment(0.75, 0.5), end: Alignment(0.75, 0.5),
colors: [ colors: [
@ -500,7 +509,7 @@ class CirclePage extends StatelessWidget {
), ),
Container( Container(
height: 34.sp, height: 34.sp,
padding: EdgeInsets.only(left: 5.sp,right: 10.sp), padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
margin: EdgeInsets.only(top: 5.sp), margin: EdgeInsets.only(top: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp), borderRadius: BorderRadius.circular(17.sp),
@ -515,7 +524,9 @@ class CirclePage extends StatelessWidget {
height: 24.sp, height: 24.sp,
child: Stack(children: widgets), child: Stack(children: widgets),
), ),
SizedBox(width: 4.sp,), SizedBox(
width: 4.sp,
),
Expanded( Expanded(
child: Text( child: Text(
'1位圈友已私聊', '1位圈友已私聊',
@ -535,6 +546,7 @@ class CirclePage extends StatelessWidget {
), ),
); );
} }
/// ///
normalDynamicItem() { normalDynamicItem() {
Text descText = Text( Text descText = Text(
@ -583,7 +595,7 @@ class CirclePage extends StatelessWidget {
Container( Container(
height: 279.sp, height: 279.sp,
width: Get.width, width: Get.width,
padding: EdgeInsets.only( left: 12.sp, right: 12.sp), padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
child: Column( child: Column(
children: [ children: [
Container( Container(
@ -707,7 +719,7 @@ class CirclePage extends StatelessWidget {
), ),
Container( Container(
height: 34.sp, height: 34.sp,
padding: EdgeInsets.only(left: 5.sp,right: 10.sp), padding: EdgeInsets.only(left: 5.sp, right: 10.sp),
margin: EdgeInsets.only(top: 5.sp), margin: EdgeInsets.only(top: 5.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.sp), borderRadius: BorderRadius.circular(17.sp),
@ -722,7 +734,9 @@ class CirclePage extends StatelessWidget {
height: 24.sp, height: 24.sp,
child: Stack(children: widgets), child: Stack(children: widgets),
), ),
SizedBox(width: 4.sp,), SizedBox(
width: 4.sp,
),
Expanded( Expanded(
child: Text( child: Text(
'1位圈友已私聊', '1位圈友已私聊',
@ -754,9 +768,7 @@ class CirclePage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: AssetImage(getCircleImage('add_tip_bg')) image: AssetImage(getCircleImage('add_tip_bg')))),
)
),
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@ -767,21 +779,34 @@ class CirclePage extends StatelessWidget {
onTap: () { onTap: () {
Get.back(); Get.back();
}, },
child: Image.asset(getCircleImage('close'),width: 24.sp,), child: Image.asset(
getCircleImage('close'),
width: 24.sp,
),
)), )),
Positioned( Positioned(
top: 24.sp, top: 24.sp,
child: Text('解锁圈子才能主动私聊',style: TextStyle(color: Colors.white,fontSize: 16.sp),)), child: Text(
'解锁圈子才能主动私聊',
style: TextStyle(color: Colors.white, fontSize: 16.sp),
)),
Positioned( Positioned(
left: 17.sp, left: 17.sp,
top: 64.sp, top: 64.sp,
child: Text('为什么要解锁圈子?',style: TextStyle(color: Colors.white,fontSize: 16.sp),)), child: Text(
'为什么要解锁圈子?',
style: TextStyle(color: Colors.white, fontSize: 16.sp),
)),
Positioned( Positioned(
top: 98.sp, top: 98.sp,
child:Container( child: Container(
width: 339.sp, width: 339.sp,
padding: EdgeInsets.only(left: 17.sp,right: 17.sp), padding: EdgeInsets.only(left: 17.sp, right: 17.sp),
child: Text('为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核保证用户真实避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的跨友;3、谢绝只会白嫖的猎奇人士。',style: TextStyle(color:Color.fromRGBO(247, 250, 250, 0.8),fontSize: 12.sp)), child: Text(
'为打造纯净的社交环境,更好地服务大家,基于以下几方面考虑:1、平台升级为全天24小时人工审核保证用户真实避免骗子、酒托、虚假人士等扰乱平台 ;2、杜绝未入圈用户随意骚扰或影响已入圈的跨友;3、谢绝只会白嫖的猎奇人士。',
style: TextStyle(
color: Color.fromRGBO(247, 250, 250, 0.8),
fontSize: 12.sp)),
)), )),
Positioned( Positioned(
bottom: 18.sp, bottom: 18.sp,
@ -793,21 +818,38 @@ class CirclePage extends StatelessWidget {
borderRadius: BorderRadius.circular(21.sp), borderRadius: BorderRadius.circular(21.sp),
gradient: const LinearGradient( gradient: const LinearGradient(
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end:Alignment.centerRight, end: Alignment.centerRight,
colors: [Color(0xff0AFCFF),Color(0xffD739EA)] colors: [Color(0xff0AFCFF), Color(0xffD739EA)])),
) child: Text(
'立即解锁',
style: TextStyle(color: Colors.white, fontSize: 16.sp),
), ),
child: Text('立即解锁',style: TextStyle(color: Colors.white,fontSize: 16.sp),),
)), )),
Positioned( Positioned(
bottom: 72.sp, bottom: 72.sp,
child: Container( child: Container(
child: Row( child: Row(
children: [ children: [
Text('¥18',style: TextStyle(color: Color(0xffE845FF),fontSize: 16.sp,fontWeight: FontWeight.w600),), Text(
SizedBox(width: 2.sp,), '¥18',
Text('(原价60)',style: TextStyle(color: Colors.white70,fontSize: 16.sp,fontWeight: FontWeight.w400,decoration: TextDecoration.lineThrough, style: TextStyle(
decorationColor: Colors.white70,),), color: Color(0xffE845FF),
fontSize: 16.sp,
fontWeight: FontWeight.w600),
),
SizedBox(
width: 2.sp,
),
Text(
'(原价60)',
style: TextStyle(
color: Colors.white70,
fontSize: 16.sp,
fontWeight: FontWeight.w400,
decoration: TextDecoration.lineThrough,
decorationColor: Colors.white70,
),
),
], ],
), ),
)) ))
@ -818,4 +860,3 @@ class CirclePage extends StatelessWidget {
); );
} }
} }

View File

@ -9,7 +9,7 @@ class HomeLogic extends GetxController {
int currentIndex = 1; int currentIndex = 1;
Widget currentPage = Container(color: Colors.red,); Widget currentPage = Container();
final HomeState state = HomeState(); final HomeState state = HomeState();
String getInfo () { String getInfo () {

View File

@ -1,4 +1,3 @@
import 'package:circle_app/app/minefragment/view.dart'; import 'package:circle_app/app/minefragment/view.dart';
import 'package:circle_app/app/circle/view.dart'; import 'package:circle_app/app/circle/view.dart';
import 'package:circle_app/app/msg/view.dart'; import 'package:circle_app/app/msg/view.dart';
@ -20,7 +19,7 @@ class HomePage extends StatelessWidget {
final List _tabs = [ final List _tabs = [
MsgPage(), MsgPage(),
CirclePage(), CirclePage(),
MinefragmentPage(), MinefragmentPage(),
]; ];
@override @override
@ -36,30 +35,30 @@ MinefragmentPage(),
height: 49.sp + MediaQuery.of(context).padding.bottom, height: 49.sp + MediaQuery.of(context).padding.bottom,
width: Get.width, width: Get.width,
// color: Colors.red, // color: Colors.red,
padding: EdgeInsets.only(left: 50.sp,right: 50.sp,top: 8.sp), padding: EdgeInsets.only(left: 50.sp, right: 50.sp, top: 8.sp),
decoration: BoxDecoration( decoration: BoxDecoration(
image:DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: AssetImage(getTabbarImage('tabbar_bg'),) image: AssetImage(
) getTabbarImage('tabbar_bg'),
), ))),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
funcItem(0, 'msg', 0 == controller.currentIndex, controller), funcItem(0, 'msg', 0 == controller.currentIndex, controller),
funcItem(1, 'circle', 1 == controller.currentIndex, controller), funcItem(
1, 'circle', 1 == controller.currentIndex, controller),
funcItem(2, 'mine', 2 == controller.currentIndex, controller), funcItem(2, 'mine', 2 == controller.currentIndex, controller),
], ],
), ),
), ),
body:_tabs[controller.currentIndex] body: _tabs[controller.currentIndex]),
),
); );
}); });
} }
funcItem(int index,String image,bool isSelected,HomeLogic controller) { funcItem(int index, String image, bool isSelected, HomeLogic controller) {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
if (!isSelected) { if (!isSelected) {
@ -67,10 +66,14 @@ MinefragmentPage(),
} }
}, },
child: Container( child: Container(
child: Image.asset(isSelected ? getTabbarImage(image + '_selected') : getTabbarImage(image + '_normal'),width: 34.sp,height: 34.sp,), child: Image.asset(
isSelected
? getTabbarImage(image + '_selected')
: getTabbarImage(image + '_normal'),
width: 34.sp,
height: 34.sp,
),
), ),
); );
} }
} }

View File

@ -18,14 +18,10 @@ class MsgPage extends StatelessWidget {
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))), image: AssetImage(getBaseImage('home_back')))),
// child: Image.asset(
// getBaseImage('bg'),
// fit: BoxFit.fill,
// ),
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: SafeArea( body: SafeArea(
child:GetBuilder(builder: (MsgLogic controller) { child: GetBuilder(builder: (MsgLogic controller) {
return Container( return Container(
child: Column( child: Column(
children: [ children: [
@ -88,33 +84,46 @@ class MsgPage extends StatelessWidget {
), ),
); );
} }
tipWidget() { tipWidget() {
return Container( return Container(
margin: EdgeInsets.only(top: 18.sp,bottom: 15.sp), margin: EdgeInsets.only(top: 18.sp, bottom: 15.sp),
padding: EdgeInsets.only(left: 16.sp,right: 18.sp), padding: EdgeInsets.only(left: 16.sp, right: 18.sp),
width: Get.width, width: Get.width,
height: 20, height: 20,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text('想要聊天的圈友',style: TextStyle(color: Colors.white,fontSize: 16.sp,fontWeight: FontWeight.w500),), Text(
'想要聊天的圈友',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w500),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ShaderMask( ShaderMask(
shaderCallback: (Rect bounds) { shaderCallback: (Rect bounds) {
return const LinearGradient( return const LinearGradient(
begin:Alignment.centerRight, begin: Alignment.centerRight,
end: Alignment.centerLeft, end: Alignment.centerLeft,
colors: [Color(0xff71F3F2), Color(0xffF657FF)], colors: [Color(0xff71F3F2), Color(0xffF657FF)],
).createShader(Offset.zero & bounds.size); ).createShader(Offset.zero & bounds.size);
}, },
child:Text( child: Text(
'n人等您聊', 'n人等您聊',
style: TextStyle(fontSize: 16.sp,fontWeight: FontWeight.w600,color: Colors.white), style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w600,
color: Colors.white),
), ),
), ),
Image.asset(getMsgImage('msg_arr'),width: 24.sp,) Image.asset(
getMsgImage('msg_arr'),
width: 24.sp,
)
], ],
) )
], ],
@ -124,24 +133,31 @@ class MsgPage extends StatelessWidget {
reconmandWidget() { reconmandWidget() {
return Container( return Container(
padding: EdgeInsets.only(left: 16.sp,right: 18.sp), padding: EdgeInsets.only(left: 16.sp, right: 18.sp),
width: Get.width, width: Get.width,
child: Row( child: Row(
children: [ children: [
Container( Container(
child: Column( child: Column(
children: [ children: [
Image.asset(getMsgImage('msg_first'), width: 50.sp,), Image.asset(
SizedBox(height: 4.sp,), getMsgImage('msg_first'),
Text('抢占第一', width: 50.sp,
style: TextStyle(color: Colors.white, fontSize: 12.sp),), ),
SizedBox(
height: 4.sp,
),
Text(
'抢占第一',
style: TextStyle(color: Colors.white, fontSize: 12.sp),
),
], ],
), ),
), ),
Expanded(child: SingleChildScrollView( Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child:Container( child: Container(
// width: 50.sp * 10, // width: 50.sp * 10,
child: Row( child: Row(
children: [ children: [
@ -163,17 +179,25 @@ class MsgPage extends StatelessWidget {
), ),
); );
} }
peopleWidget() { peopleWidget() {
return Container( return Container(
margin: EdgeInsets.only(left: 18.sp), margin: EdgeInsets.only(left: 18.sp),
child: Column( child: Column(
children: [ children: [
Image.asset(getMsgImage('msg_first'),width: 50.sp,), Image.asset(
SizedBox(height: 4.sp,), getMsgImage('msg_first'),
Text('抢占第一',style: TextStyle(color: Colors.white,fontSize: 12.sp),), width: 50.sp,
),
SizedBox(
height: 4.sp,
),
Text(
'抢占第一',
style: TextStyle(color: Colors.white, fontSize: 12.sp),
),
], ],
), ),
); );
} }
} }

View File

@ -11,7 +11,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.backgroundColor, this.backgroundColor,
this.title = '', this.title = '',
this.centerTitle = '', this.centerTitle = '',
this.actionName = '', this.actionWdiget,
this.backImg = 'assets/images/navigator/back.png', this.backImg = 'assets/images/navigator/back.png',
this.backImgColor, this.backImgColor,
this.onPressed, this.onPressed,
@ -25,7 +25,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final String centerTitle; final String centerTitle;
final String backImg; final String backImg;
final Color? backImgColor; final Color? backImgColor;
final String actionName; final Widget? actionWdiget;
final VoidCallback? onPressed; final VoidCallback? onPressed;
final bool isBack; final bool isBack;
final bool isDiyBack; final bool isDiyBack;
@ -38,7 +38,10 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final SystemUiOverlayStyle overlayStyle = ThemeData.estimateBrightnessForColor(bgColor) == Brightness.dark final SystemUiOverlayStyle overlayStyle = ThemeData.estimateBrightnessForColor(bgColor) == Brightness.dark
? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark; ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark;
final Widget action = Container(); final Widget action = actionWdiget == null ? Container() : GestureDetector(
onTap: onPressed,
child: actionWdiget,
);
final Widget back = isBack ? IconButton( final Widget back = isBack ? IconButton(
onPressed: () async { onPressed: () async {
@ -92,7 +95,9 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
children: <Widget>[ children: <Widget>[
titleWidget, titleWidget,
back, back,
action, Positioned(
right: 15.sp,
child: action),
], ],
), ),
), ),

View File

@ -3,6 +3,8 @@ import 'package:circle_app/app/aboutapp/view.dart';
import 'package:circle_app/app/account/binding.dart'; import 'package:circle_app/app/account/binding.dart';
import 'package:circle_app/app/account/view.dart'; import 'package:circle_app/app/account/view.dart';
import 'package:circle_app/app/blacklist/binding.dart'; import 'package:circle_app/app/blacklist/binding.dart';
import 'package:circle_app/app/call_out/binding.dart';
import 'package:circle_app/app/call_out/view.dart';
import 'package:circle_app/app/friendslist/binding.dart'; import 'package:circle_app/app/friendslist/binding.dart';
import 'package:circle_app/app/friendslist/view.dart'; import 'package:circle_app/app/friendslist/view.dart';
import 'package:circle_app/app/help/binding.dart'; import 'package:circle_app/app/help/binding.dart';
@ -83,5 +85,10 @@ class AppPages {
page: () => UserinfoPage(), page: () => UserinfoPage(),
binding: UserinfoBinding(), binding: UserinfoBinding(),
), ),
GetPage(
name: AppRoutes.Call_out,
page: () => Call_outPage(),
binding: Call_outBinding(),
),
]; ];
} }

View File

@ -1,6 +1,7 @@
abstract class AppRoutes { abstract class AppRoutes {
static const Home = '/home'; static const Home = '/home';
static const Complete_materialPage = '/Complete_materialPage'; static const Complete_materialPage = '/Complete_materialPage';
static const Call_out = '/Call_out';
static const MineFragment = '/home/minefragment'; static const MineFragment = '/home/minefragment';
static const SetUpActivity = '/user/SetUpActivity'; static const SetUpActivity = '/user/SetUpActivity';
static const AccountActivity = '/user/AccountActivity'; static const AccountActivity = '/user/AccountActivity';