| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
- import 'package:location/resource/string.gen.dart';
- import 'package:location/utils/common_expand.dart';
- import '../../../resource/assets.gen.dart';
- import '../../../resource/colors.gen.dart';
- class NewsReportDialog {
- static const String _tag = 'AccountReplaceDialog';
- static void show() {
- SmartDialog.show(
- builder: (_) => _NewsReportDialogView(),
- tag: _tag,
- clickMaskDismiss: false);
- }
- static void dismiss() {
- SmartDialog.dismiss(tag: _tag);
- }
- }
- class _NewsReportDialogView extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Container(
- width: 274.w,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(16.r),
- border: Border.all(
- color: Colors.white,
- width: 2.w,
- ),
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [
- '#E4E4FF'.color,
- '#FFFFFF'.color,
- ])),
- child: Stack(
- alignment: Alignment.center,
- children: [
- // Positioned(
- // top: 16.w,
- // right: 16.w,
- // child: GestureDetector(
- // onTap: onCloseClick,
- // child: Assets.images.iconAgreementClose
- // .image(width: 20.w, height: 20.w),
- // )),
- buildAccountReplaceContent(),
- ],
- ),
- );
- }
- Widget buildAccountReplaceContent() {
- return IntrinsicHeight(
- child: Column(
- children: [
- SizedBox(height: 33.w),
- Assets.images.iconNewsReportAgree.image(height: 76.w),
- SizedBox(height: 29.w),
- Text("提交成功",
- style: TextStyle(
- fontSize: 17.sp,
- color: '#333333'.color,
- fontWeight: FontWeight.bold)),
- SizedBox(height: 20.w),
- GestureDetector(
- onTap: onKnowClick,
- child: Container(
- width: 229.w,
- height: 43.w,
- decoration: BoxDecoration(
- color: ColorName.colorPrimary,
- borderRadius: BorderRadius.circular(100.r),
- ),
- child: Center(
- child: Text("我知道了",
- style: TextStyle(
- fontSize: 14.sp,
- color: Colors.white,
- fontWeight: FontWeight.w500)),
- ),
- ),
- ),
- SizedBox(height: 20.w),
- ],
- ),
- );
- }
- void onCloseClick() {
- NewsReportDialog.dismiss();
- }
- void onKnowClick() {
- NewsReportDialog.dismiss();
- }
- }
|