|
@@ -9,6 +9,8 @@ import 'package:location/resource/string.gen.dart';
|
|
|
import 'package:location/utils/common_expand.dart';
|
|
import 'package:location/utils/common_expand.dart';
|
|
|
import 'package:location/utils/common_style.dart';
|
|
import 'package:location/utils/common_style.dart';
|
|
|
|
|
|
|
|
|
|
+import '../resource/colors.gen.dart';
|
|
|
|
|
+
|
|
|
class AddFriendDialog {
|
|
class AddFriendDialog {
|
|
|
static final String _tag = 'AddFriendDialog';
|
|
static final String _tag = 'AddFriendDialog';
|
|
|
|
|
|
|
@@ -52,82 +54,89 @@ class AddFriendDialogView extends Dialog {
|
|
|
|
|
|
|
|
@override
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
- return IntrinsicHeight(
|
|
|
|
|
|
|
+ return Container(
|
|
|
|
|
+ width: 360.w,
|
|
|
|
|
+ height: 400.w,
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ image: DecorationImage(
|
|
|
|
|
+ image: Assets.images.bgDialogAddFriend.provider(),
|
|
|
|
|
+ fit: BoxFit.fill),
|
|
|
|
|
+ ),
|
|
|
child: Stack(
|
|
child: Stack(
|
|
|
children: [
|
|
children: [
|
|
|
- Center(
|
|
|
|
|
|
|
+ buildFriendTitleView(),
|
|
|
|
|
+ buildAddFriendBtnView(),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Widget buildFriendTitleView() {
|
|
|
|
|
+ return Positioned(
|
|
|
|
|
+ left: 45.w,
|
|
|
|
|
+ top: 64.w,
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(StringName.dialogAddFriendTitle,
|
|
|
|
|
+ style: TextStyle(fontSize: 12.sp, color: '#7A6187'.color)),
|
|
|
|
|
+ SizedBox(height: 4.w),
|
|
|
|
|
+ Assets.images.imgDialogAddFriendTitle.image(width: 167.w)
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Widget buildAddFriendBtnView() {
|
|
|
|
|
+ return Positioned(
|
|
|
|
|
+ left: 55.w,
|
|
|
|
|
+ right: 55.w,
|
|
|
|
|
+ bottom: 10.w,
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ onTap: onAddFriendClick,
|
|
|
child: Container(
|
|
child: Container(
|
|
|
- width: 289.w,
|
|
|
|
|
- margin: EdgeInsets.only(top: 34.w),
|
|
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
- color: Colors.white,
|
|
|
|
|
- borderRadius: BorderRadius.circular(20.w),
|
|
|
|
|
- ),
|
|
|
|
|
- child: IntrinsicHeight(
|
|
|
|
|
- child: Align(
|
|
|
|
|
- alignment: Alignment.topCenter,
|
|
|
|
|
- child: Stack(
|
|
|
|
|
- children: [
|
|
|
|
|
- SizedBox(
|
|
|
|
|
- width: double.infinity,
|
|
|
|
|
- child: Column(children: [
|
|
|
|
|
- SizedBox(height: 89.w),
|
|
|
|
|
- Text(StringName.dialogAddFriendTitle,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- fontSize: 18.sp,
|
|
|
|
|
- color: '#333333'.color,
|
|
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
|
|
- SizedBox(height: 8.w),
|
|
|
|
|
- Text(StringName.dialogAddFriendDesc,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- fontSize: 15.sp, color: '#404040'.color)),
|
|
|
|
|
- SizedBox(height: 23.w),
|
|
|
|
|
- GestureDetector(
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- onAddClick();
|
|
|
|
|
- AddFriendDialog.dismiss();
|
|
|
|
|
- },
|
|
|
|
|
- child: Container(
|
|
|
|
|
- width: 229.w,
|
|
|
|
|
- height: 40.w,
|
|
|
|
|
- decoration: getPrimaryBtnDecoration(32.w),
|
|
|
|
|
- child: Center(
|
|
|
|
|
- child: Text(
|
|
|
|
|
- Platform.isAndroid
|
|
|
|
|
- ? StringName.dialogAddFriendBtn
|
|
|
|
|
- : StringName.dialogAddFriendBtnIos,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- fontSize: 14.sp, color: Colors.white)),
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- SizedBox(height: 22.w),
|
|
|
|
|
- ]),
|
|
|
|
|
- ),
|
|
|
|
|
- Align(
|
|
|
|
|
- alignment: Alignment.topRight,
|
|
|
|
|
- child: Container(
|
|
|
|
|
- margin: EdgeInsets.only(top: 12.w, right: 12.w),
|
|
|
|
|
- child: GestureDetector(
|
|
|
|
|
- onTap: () {
|
|
|
|
|
- onCloseClick?.call();
|
|
|
|
|
- AddFriendDialog.dismiss();
|
|
|
|
|
- },
|
|
|
|
|
- child: Assets.images.iconDialogClose
|
|
|
|
|
- .image(width: 20.w, height: 20.w),
|
|
|
|
|
- ),
|
|
|
|
|
- ))
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ borderRadius: BorderRadius.circular(100.w),
|
|
|
|
|
+ gradient: LinearGradient(colors: [
|
|
|
|
|
+ '#7B7DFF'.color,
|
|
|
|
|
+ '#6365FF'.color,
|
|
|
|
|
+ ])),
|
|
|
|
|
+ width: double.infinity,
|
|
|
|
|
+ height: 44.w,
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ Platform.isAndroid
|
|
|
|
|
+ ? StringName.dialogAddFriendBtn
|
|
|
|
|
+ : StringName.dialogAddFriendBtnIos,
|
|
|
|
|
+ style: TextStyle(fontSize: 15.sp, color: Colors.white)),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
- Align(
|
|
|
|
|
- alignment: Alignment.topCenter,
|
|
|
|
|
- child: Assets.images.iconDialogAddFriend.image(width: 124.w)),
|
|
|
|
|
|
|
+ SizedBox(height: 3.w),
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ onTap: onNextTimeClick,
|
|
|
|
|
+ child: Padding(
|
|
|
|
|
+ padding: EdgeInsets.all(8.w),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ StringName.dialogAddFriendNextTime,
|
|
|
|
|
+ style: TextStyle(fontSize: 11.sp, color: ColorName.black40),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ )
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ void onNextTimeClick() {
|
|
|
|
|
+ onCloseClick?.call();
|
|
|
|
|
+ AddFriendDialog.dismiss();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ void onAddFriendClick() {
|
|
|
|
|
+ onAddClick();
|
|
|
|
|
+ AddFriendDialog.dismiss();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|