diff --git a/circle_app/assets/images/circle/check.png b/circle_app/assets/images/circle/check.png new file mode 100644 index 0000000..d18a60f Binary files /dev/null and b/circle_app/assets/images/circle/check.png differ diff --git a/circle_app/assets/images/circle/line.png b/circle_app/assets/images/circle/line.png new file mode 100644 index 0000000..a1b3fa0 Binary files /dev/null and b/circle_app/assets/images/circle/line.png differ diff --git a/circle_app/assets/images/circle/photo.png b/circle_app/assets/images/circle/photo.png new file mode 100644 index 0000000..761a3a5 Binary files /dev/null and b/circle_app/assets/images/circle/photo.png differ diff --git a/circle_app/assets/images/circle/push.png b/circle_app/assets/images/circle/push.png new file mode 100644 index 0000000..ffe2b82 Binary files /dev/null and b/circle_app/assets/images/circle/push.png differ diff --git a/circle_app/assets/images/circle/uncheck.png b/circle_app/assets/images/circle/uncheck.png new file mode 100644 index 0000000..dcbb85e Binary files /dev/null and b/circle_app/assets/images/circle/uncheck.png differ diff --git a/circle_app/assets/images/circle/video.png b/circle_app/assets/images/circle/video.png new file mode 100644 index 0000000..acb4ebd Binary files /dev/null and b/circle_app/assets/images/circle/video.png differ diff --git a/circle_app/lib/app/call_out/logic.dart b/circle_app/lib/app/call_out/logic.dart index 5db85af..bad07ed 100644 --- a/circle_app/lib/app/call_out/logic.dart +++ b/circle_app/lib/app/call_out/logic.dart @@ -1,7 +1,10 @@ +import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; import 'state.dart'; class Call_outLogic extends GetxController { final Call_outState state = Call_outState(); + TextEditingController textEditingController = TextEditingController(); + bool isCheck = false; } diff --git a/circle_app/lib/app/call_out/view.dart b/circle_app/lib/app/call_out/view.dart index bca5ff2..7fb34df 100644 --- a/circle_app/lib/app/call_out/view.dart +++ b/circle_app/lib/app/call_out/view.dart @@ -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_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'logic.dart'; @@ -11,6 +14,163 @@ class Call_outPage extends StatelessWidget { @override 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), + ), + ) + ], + ), + ) + ], + ), + ); + }), + ), + )), + ); + ; } } diff --git a/circle_app/lib/app/circle/view.dart b/circle_app/lib/app/circle/view.dart index b9d42bf..92a1cf6 100644 --- a/circle_app/lib/app/circle/view.dart +++ b/circle_app/lib/app/circle/view.dart @@ -1,5 +1,4 @@ - - +import 'package:circle_app/router/app_routers.dart'; import 'package:circle_app/util/util.dart'; import 'package:flutter/material.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), child: Stack( children: [ - ClipRRect( borderRadius: BorderRadius.circular(10.sp), child: SizedBox( @@ -191,7 +189,7 @@ class CirclePage extends StatelessWidget { margin: EdgeInsets.only(top: 72.sp), child: ListView.builder( itemCount: 3, - itemBuilder: (context,index) { + itemBuilder: (context, index) { if (index == 0) { return Container( padding: EdgeInsets.only(left: 12.sp, right: 12.sp), @@ -199,8 +197,8 @@ class CirclePage extends StatelessWidget { decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.fill, - image: - AssetImage(getCircleImage('circle_desc')))), + image: AssetImage( + getCircleImage('circle_desc')))), child: Column( children: [ Container( @@ -208,8 +206,10 @@ class CirclePage extends StatelessWidget { child: RichText( overflow: TextOverflow.fade, maxLines: 2, - text: TextSpan( - children: [descSpan, span])), + text: TextSpan(children: [ + descSpan, + span + ])), ), Container( child: Row( @@ -218,7 +218,8 @@ class CirclePage extends StatelessWidget { children: [ Container( height: 30.sp, - width: 30.0 + 15 * (widgets.length - 1), + width: 30.0 + + 15 * (widgets.length - 1), child: Stack( children: widgets, ), @@ -229,7 +230,8 @@ class CirclePage extends StatelessWidget { Text( '3.5万圈友', style: TextStyle( - color: Colors.white, fontSize: 12.sp), + color: Colors.white, + fontSize: 12.sp), ), SizedBox( width: 8.sp, @@ -254,74 +256,81 @@ class CirclePage extends StatelessWidget { }), ), ClipRRect( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10.sp), - topRight: Radius.circular(10.sp)), - child: Container( - padding: EdgeInsets.only(left: 12.sp, right: 12.sp), - height: 72.sp, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage( - getCircleImage('top_circle_bg')))), - child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Image.network( - 'https://p3-passport.byteimg.com/img/user-avatar/eb429d4dbb3c246f580a6f7894f2b246~100x100.awebp', - width: 42.sp, - height: 42.sp, - fit: BoxFit.fill, - ), - Expanded( - child: Container( - padding: - EdgeInsets.only(left: 8.sp, top: 12.sp), - alignment: Alignment.centerLeft, - height: 72.sp, - child: Column( - children: [ - Text( - '圈子名称', - style: TextStyle( - color: Colors.white, - fontSize: 18.sp, - fontWeight: FontWeight.w600), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.sp), + topRight: Radius.circular(10.sp)), + child: Container( + padding: EdgeInsets.only(left: 12.sp, right: 12.sp), + height: 72.sp, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: + AssetImage(getCircleImage('top_circle_bg')))), + child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.network( + 'https://p3-passport.byteimg.com/img/user-avatar/eb429d4dbb3c246f580a6f7894f2b246~100x100.awebp', + width: 42.sp, + height: 42.sp, + fit: BoxFit.fill, + ), + Expanded( + child: Container( + padding: EdgeInsets.only(left: 8.sp, top: 12.sp), + alignment: Alignment.centerLeft, + height: 72.sp, + child: Column( + children: [ + Text( + '圈子名称', + style: TextStyle( + color: Colors.white, + fontSize: 18.sp, + fontWeight: FontWeight.w600), + ), + SizedBox( + height: 4.sp, + ), + Text( + '35.6万人看过', + style: TextStyle( + color: Color(0xff03FEFB), + fontSize: 12.sp, + ), + ), + ], ), - SizedBox( - height: 4.sp, + )), + GestureDetector( + onTap: () { + Get.bottomSheet(tipWdiget(), + isScrollControlled: true, enableDrag: false); + }, + child: Image.asset( + getCircleImage('add'), + width: 77.sp, ), - Text( - '35.6万人看过', - style: TextStyle( - color: Color(0xff03FEFB), - fontSize: 12.sp, - ), - ), - ], - ), - )), - GestureDetector( - onTap: () { - Get.bottomSheet(tipWdiget(),isScrollControlled:true,enableDrag:false); - }, - child: Image.asset( - getCircleImage('add'), - width: 77.sp, - ), - ) - ], - ), - )), + ) + ], + ), + )), Positioned( - bottom: 56.sp, + bottom: 56.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() { Text descText = Text( @@ -439,7 +448,7 @@ class CirclePage extends StatelessWidget { EdgeInsets.only(left: 6.sp, right: 6.sp), decoration: BoxDecoration( borderRadius: BorderRadius.circular(9.sp), - gradient:const LinearGradient( + gradient: const LinearGradient( begin: Alignment(0.25, 0.5), end: Alignment(0.75, 0.5), colors: [ @@ -470,7 +479,7 @@ class CirclePage extends StatelessWidget { height: 100.sp, margin: EdgeInsets.only(top: 5.sp), child: GridView( - physics: const NeverScrollableScrollPhysics(), + physics: const NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, //横轴三个子widget crossAxisSpacing: 8.sp, @@ -500,7 +509,7 @@ class CirclePage extends StatelessWidget { ), Container( 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), decoration: BoxDecoration( borderRadius: BorderRadius.circular(17.sp), @@ -515,7 +524,9 @@ class CirclePage extends StatelessWidget { height: 24.sp, child: Stack(children: widgets), ), - SizedBox(width: 4.sp,), + SizedBox( + width: 4.sp, + ), Expanded( child: Text( '1位圈友已私聊', @@ -535,6 +546,7 @@ class CirclePage extends StatelessWidget { ), ); } + ///普通图文喊话 normalDynamicItem() { Text descText = Text( @@ -583,7 +595,7 @@ class CirclePage extends StatelessWidget { Container( height: 279.sp, width: Get.width, - padding: EdgeInsets.only( left: 12.sp, right: 12.sp), + padding: EdgeInsets.only(left: 12.sp, right: 12.sp), child: Column( children: [ Container( @@ -593,79 +605,79 @@ class CirclePage extends StatelessWidget { children: [ GestureDetector( child: Stack( - alignment: Alignment.center, - children: [ - Image.asset( - getCircleImage('avatar_bg'), - width: 42.sp, - ), - ClipOval( - child: Image.network( - 'https://p3-passport.byteimg.com/img/user-avatar/eb429d4dbb3c246f580a6f7894f2b246~100x100.awebp', - width: 40.sp, - height: 40.sp, - fit: BoxFit.fill, - ), - ) - ], - )), + alignment: Alignment.center, + children: [ + Image.asset( + getCircleImage('avatar_bg'), + width: 42.sp, + ), + ClipOval( + child: Image.network( + 'https://p3-passport.byteimg.com/img/user-avatar/eb429d4dbb3c246f580a6f7894f2b246~100x100.awebp', + width: 40.sp, + height: 40.sp, + fit: BoxFit.fill, + ), + ) + ], + )), Expanded( child: Container( - padding: EdgeInsets.only(left: 8.sp, top: 12.sp), - alignment: Alignment.centerLeft, - height: 72.sp, - child: Column( + padding: EdgeInsets.only(left: 8.sp, top: 12.sp), + alignment: Alignment.centerLeft, + height: 72.sp, + child: Column( + children: [ + Row( children: [ - Row( - children: [ - Text( - '圈子名称', - style: TextStyle( - color: Colors.white, - fontSize: 18.sp, - fontWeight: FontWeight.w600), - ), - SizedBox( - width: 8.sp, - ), - Image.asset( - getCircleImage('vip'), - width: 36.sp, - ) - ], + Text( + '圈子名称', + style: TextStyle( + color: Colors.white, + fontSize: 18.sp, + fontWeight: FontWeight.w600), ), SizedBox( - height: 4.sp, - ), - Row( - children: [ - Container( - alignment: Alignment.center, - height: 18.sp, - padding: - EdgeInsets.only(left: 6.sp, right: 6.sp), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(9.sp), - gradient: LinearGradient( - begin: Alignment(0.25, 0.5), - end: Alignment(0.75, 0.5), - colors: [ - Color(0xff8DFFF8), - Color(0xffB5D3FF) - ])), - child: Text( - '男.33.DOM.异性恋', - style: TextStyle( - color: Colors.black, - fontSize: 12.sp, - ), - ), - ) - ], + width: 8.sp, ), + Image.asset( + getCircleImage('vip'), + width: 36.sp, + ) ], ), - )), + SizedBox( + height: 4.sp, + ), + Row( + children: [ + Container( + alignment: Alignment.center, + height: 18.sp, + padding: + EdgeInsets.only(left: 6.sp, right: 6.sp), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(9.sp), + gradient: LinearGradient( + begin: Alignment(0.25, 0.5), + end: Alignment(0.75, 0.5), + colors: [ + Color(0xff8DFFF8), + Color(0xffB5D3FF) + ])), + child: Text( + '男.33.DOM.异性恋', + style: TextStyle( + color: Colors.black, + fontSize: 12.sp, + ), + ), + ) + ], + ), + ], + ), + )), ], ), ), @@ -682,7 +694,7 @@ class CirclePage extends StatelessWidget { crossAxisCount: 3, //横轴三个子widget crossAxisSpacing: 8.sp, childAspectRatio: 1.0 //宽高比为1时,子widget - ), + ), children: [ ClipRRect( borderRadius: BorderRadius.circular(6.sp), @@ -707,7 +719,7 @@ class CirclePage extends StatelessWidget { ), Container( 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), decoration: BoxDecoration( borderRadius: BorderRadius.circular(17.sp), @@ -722,12 +734,14 @@ class CirclePage extends StatelessWidget { height: 24.sp, child: Stack(children: widgets), ), - SizedBox(width: 4.sp,), + SizedBox( + width: 4.sp, + ), Expanded( child: Text( - '1位圈友已私聊', - style: TextStyle(color: Colors.white, fontSize: 12.sp), - )), + '1位圈友已私聊', + style: TextStyle(color: Colors.white, fontSize: 12.sp), + )), Image.asset( getCircleImage('chat'), width: 60.sp, @@ -752,65 +766,93 @@ class CirclePage extends StatelessWidget { width: 339.sp, height: 330.sp, decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getCircleImage('add_tip_bg')) - ) - ), + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage(getCircleImage('add_tip_bg')))), child: Stack( alignment: Alignment.center, children: [ Positioned( - top: 5.sp, - right: 12.sp, + top: 5.sp, + right: 12.sp, child: GestureDetector( onTap: () { Get.back(); }, - child: Image.asset(getCircleImage('close'),width: 24.sp,), - )), + child: Image.asset( + getCircleImage('close'), + width: 24.sp, + ), + )), Positioned( - top: 24.sp, - child: Text('解锁圈子才能主动私聊',style: TextStyle(color: Colors.white,fontSize: 16.sp),)), - Positioned( - left: 17.sp, - top: 64.sp, - child: Text('为什么要解锁圈子?',style: TextStyle(color: Colors.white,fontSize: 16.sp),)), - Positioned( - top: 98.sp, - child:Container( - width: 339.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)), - )), + top: 24.sp, + child: Text( + '解锁圈子才能主动私聊', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + )), Positioned( - bottom: 18.sp, + left: 17.sp, + top: 64.sp, + child: Text( + '为什么要解锁圈子?', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + )), + Positioned( + top: 98.sp, child: Container( - width: 168.sp, - height: 42.sp, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(21.sp), - gradient: const LinearGradient( - begin: Alignment.centerLeft, - end:Alignment.centerRight, - colors: [Color(0xff0AFCFF),Color(0xffD739EA)] - ) - ), - child: Text('立即解锁',style: TextStyle(color: Colors.white,fontSize: 16.sp),), - )), + width: 339.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)), + )), Positioned( - bottom: 72.sp, + bottom: 18.sp, child: Container( - child: Row( - children: [ - Text('¥18',style: TextStyle(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,),), - ], - ), - )) + width: 168.sp, + height: 42.sp, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(21.sp), + gradient: const LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [Color(0xff0AFCFF), Color(0xffD739EA)])), + child: Text( + '立即解锁', + style: TextStyle(color: Colors.white, fontSize: 16.sp), + ), + )), + Positioned( + bottom: 72.sp, + child: Container( + child: Row( + children: [ + Text( + '¥18', + style: TextStyle( + 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 { ); } } - diff --git a/circle_app/lib/app/home/logic.dart b/circle_app/lib/app/home/logic.dart index caa3288..13da728 100644 --- a/circle_app/lib/app/home/logic.dart +++ b/circle_app/lib/app/home/logic.dart @@ -9,7 +9,7 @@ class HomeLogic extends GetxController { int currentIndex = 1; - Widget currentPage = Container(color: Colors.red,); + Widget currentPage = Container(); final HomeState state = HomeState(); String getInfo () { diff --git a/circle_app/lib/app/home/view.dart b/circle_app/lib/app/home/view.dart index 56f4687..4b240a2 100644 --- a/circle_app/lib/app/home/view.dart +++ b/circle_app/lib/app/home/view.dart @@ -1,4 +1,3 @@ - import 'package:circle_app/app/minefragment/view.dart'; import 'package:circle_app/app/circle/view.dart'; import 'package:circle_app/app/msg/view.dart'; @@ -20,7 +19,7 @@ class HomePage extends StatelessWidget { final List _tabs = [ MsgPage(), CirclePage(), -MinefragmentPage(), + MinefragmentPage(), ]; @override @@ -28,38 +27,38 @@ MinefragmentPage(), return GetBuilder(builder: (HomeLogic controller) { return GestureDetector( onTap: () { - // Get.toNamed(AppRoutes.Complete_materialPage); + // Get.toNamed(AppRoutes.Complete_materialPage); }, child: Scaffold( - // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), + // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), bottomNavigationBar: Container( height: 49.sp + MediaQuery.of(context).padding.bottom, width: Get.width, // 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( - image:DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getTabbarImage('tabbar_bg'),) - ) - ), + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage( + getTabbarImage('tabbar_bg'), + ))), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ 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), ], ), ), - 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( onTap: () { if (!isSelected) { @@ -67,10 +66,14 @@ MinefragmentPage(), } }, 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, + ), ), ); } - } - diff --git a/circle_app/lib/app/login/complete_material/view.dart b/circle_app/lib/app/login/complete_material/view.dart index eee6559..646dbfa 100644 --- a/circle_app/lib/app/login/complete_material/view.dart +++ b/circle_app/lib/app/login/complete_material/view.dart @@ -14,14 +14,14 @@ class Complete_materialPage extends StatelessWidget { return GetBuilder(builder: (Complete_materialLogic controller) { return Stack( children: [ - Container( - width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height, - child: Image.asset( - getBaseImage('bg'), - fit: BoxFit.fill, + Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + child: Image.asset( + getBaseImage('bg'), + fit: BoxFit.fill, + ), ), - ), Scaffold( appBar: MyAppBar( centerTitle: '完善您的个人形象', diff --git a/circle_app/lib/app/msg/view.dart b/circle_app/lib/app/msg/view.dart index 3b1ea33..364fcfc 100644 --- a/circle_app/lib/app/msg/view.dart +++ b/circle_app/lib/app/msg/view.dart @@ -18,15 +18,11 @@ class MsgPage extends StatelessWidget { image: DecorationImage( fit: BoxFit.fill, image: AssetImage(getBaseImage('home_back')))), - // child: Image.asset( - // getBaseImage('bg'), - // fit: BoxFit.fill, - // ), child: Scaffold( backgroundColor: Colors.transparent, body: SafeArea( - child:GetBuilder(builder: (MsgLogic controller) { - return Container( + child: GetBuilder(builder: (MsgLogic controller) { + return Container( child: Column( children: [ navigatorItem(), @@ -88,33 +84,46 @@ class MsgPage extends StatelessWidget { ), ); } + tipWidget() { return Container( - margin: EdgeInsets.only(top: 18.sp,bottom: 15.sp), - padding: EdgeInsets.only(left: 16.sp,right: 18.sp), + margin: EdgeInsets.only(top: 18.sp, bottom: 15.sp), + padding: EdgeInsets.only(left: 16.sp, right: 18.sp), width: Get.width, height: 20, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, 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( mainAxisAlignment: MainAxisAlignment.center, children: [ ShaderMask( shaderCallback: (Rect bounds) { return const LinearGradient( - begin:Alignment.centerRight, + begin: Alignment.centerRight, end: Alignment.centerLeft, colors: [Color(0xff71F3F2), Color(0xffF657FF)], ).createShader(Offset.zero & bounds.size); }, - child:Text( + child: Text( '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,26 +133,33 @@ class MsgPage extends StatelessWidget { reconmandWidget() { return Container( - padding: EdgeInsets.only(left: 16.sp,right: 18.sp), + padding: EdgeInsets.only(left: 16.sp, right: 18.sp), width: Get.width, child: Row( children: [ Container( child: Column( children: [ - Image.asset(getMsgImage('msg_first'), width: 50.sp,), - SizedBox(height: 4.sp,), - Text('抢占第一', - style: TextStyle(color: Colors.white, fontSize: 12.sp),), - + Image.asset( + getMsgImage('msg_first'), + width: 50.sp, + ), + SizedBox( + height: 4.sp, + ), + Text( + '抢占第一', + style: TextStyle(color: Colors.white, fontSize: 12.sp), + ), ], ), ), - Expanded(child: SingleChildScrollView( + Expanded( + child: SingleChildScrollView( scrollDirection: Axis.horizontal, - child:Container( + child: Container( // width: 50.sp * 10, - child: Row( + child: Row( children: [ peopleWidget(), peopleWidget(), @@ -163,17 +179,25 @@ class MsgPage extends StatelessWidget { ), ); } - peopleWidget() { - return Container( - margin: EdgeInsets.only(left: 18.sp), - child: Column( - children: [ - Image.asset(getMsgImage('msg_first'),width: 50.sp,), - SizedBox(height: 4.sp,), - Text('抢占第一',style: TextStyle(color: Colors.white,fontSize: 12.sp),), - ], - ), - ); - } + peopleWidget() { + return Container( + margin: EdgeInsets.only(left: 18.sp), + child: Column( + children: [ + Image.asset( + getMsgImage('msg_first'), + width: 50.sp, + ), + SizedBox( + height: 4.sp, + ), + Text( + '抢占第一', + style: TextStyle(color: Colors.white, fontSize: 12.sp), + ), + ], + ), + ); + } } diff --git a/circle_app/lib/components/my_app_bar.dart b/circle_app/lib/components/my_app_bar.dart index ed40920..9f52a30 100644 --- a/circle_app/lib/components/my_app_bar.dart +++ b/circle_app/lib/components/my_app_bar.dart @@ -11,7 +11,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { this.backgroundColor, this.title = '', this.centerTitle = '', - this.actionName = '', + this.actionWdiget, this.backImg = 'assets/images/navigator/back.png', this.backImgColor, this.onPressed, @@ -25,7 +25,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { final String centerTitle; final String backImg; final Color? backImgColor; - final String actionName; + final Widget? actionWdiget; final VoidCallback? onPressed; final bool isBack; final bool isDiyBack; @@ -38,7 +38,10 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { final SystemUiOverlayStyle overlayStyle = ThemeData.estimateBrightnessForColor(bgColor) == Brightness.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( onPressed: () async { @@ -92,7 +95,9 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { children: [ titleWidget, back, - action, + Positioned( + right: 15.sp, + child: action), ], ), ), diff --git a/circle_app/lib/router/app_pages.dart b/circle_app/lib/router/app_pages.dart index 2bb4d52..ccf25a0 100644 --- a/circle_app/lib/router/app_pages.dart +++ b/circle_app/lib/router/app_pages.dart @@ -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/view.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/view.dart'; import 'package:circle_app/app/help/binding.dart'; @@ -83,5 +85,10 @@ class AppPages { page: () => UserinfoPage(), binding: UserinfoBinding(), ), + GetPage( + name: AppRoutes.Call_out, + page: () => Call_outPage(), + binding: Call_outBinding(), + ), ]; } diff --git a/circle_app/lib/router/app_routers.dart b/circle_app/lib/router/app_routers.dart index 5d3c8c8..6a169c5 100644 --- a/circle_app/lib/router/app_routers.dart +++ b/circle_app/lib/router/app_routers.dart @@ -1,6 +1,7 @@ abstract class AppRoutes { static const Home = '/home'; static const Complete_materialPage = '/Complete_materialPage'; + static const Call_out = '/Call_out'; static const MineFragment = '/home/minefragment'; static const SetUpActivity = '/user/SetUpActivity'; static const AccountActivity = '/user/AccountActivity';