import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter/cupertino.dart'; import '../../generated/l10n.dart'; import '../../utils/font_weight.dart'; class ChatSetting extends StatefulWidget { @override State createState() { return _ChatSetting(); } } class _ChatSetting extends State{ ApiService apiService; bool topSetting = false; @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Color(0xFFF9FAF7), appBar: MyAppBar( title:"聊天设置", titleColor: Colors.black, titleSize: 18.sp, background: Colors.white, leading: true, leadingColor: Colors.black, ), body: Container( child: Column( children: [ Container( color: Colors.white, margin: EdgeInsets.symmetric(vertical: 14.h), padding: EdgeInsets.symmetric(horizontal: 16.w,vertical: 14.h), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( "置顶聊天", style: TextStyle( color: Color(0xFF353535), fontSize:15.sp, fontWeight: MyFontWeight.semi_bold, ), ), CupertinoSwitch( value: (topSetting), activeColor: Color(0xFF32A060), onChanged: (bool value) { setState((){ topSetting = !topSetting; }); }, ), ], ), SizedBox(height:31.h,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( "清空聊天记录", style: TextStyle( color: Color(0xFF353535), fontSize:15.sp, fontWeight: MyFontWeight.semi_bold, ), ), Image.asset( "assets/image/icon_right_z.webp", height:16, width:16, color: Colors.black, ), ], ) ], ), ), Expanded(child: Container( color: Colors.white, )) ], ), ), ); } }