import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/view_widget/round_button.dart'; class LanguageSetPage extends StatefulWidget { final String locale; LanguageSetPage(this.locale); @override State createState() { return _LanguageSetPage(); } } class _LanguageSetPage extends State { @override Widget build(BuildContext context) { return Column( mainAxisSize: MainAxisSize.min, children: [ Container( padding: EdgeInsets.all(20), margin: EdgeInsets.symmetric( horizontal: 16, ), alignment: Alignment.center, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(8)), boxShadow: [ BoxShadow( color: Colors.black.withAlpha(25), offset: Offset(0, 1), blurRadius: 12, spreadRadius: 0) ], ), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ Text( S.of(context).qingxuanzheninxiangshezhideyuyan, style: TextStyle( fontSize: 12, color: Color(0xFF727272), ), ), SizedBox( height: 28, ), InkWell( onTap: () { Navigator.of(context).pop("cn"); }, child: Text( S.of(context).zhongwenjianti, style: TextStyle( fontWeight: widget.locale == "zh" ? FontWeight.bold : FontWeight.normal, color: widget.locale == "zh" ? Color(0xFF32A060) : Color(0xFFA29E9E), fontSize: 16, ), ), ), SizedBox( height: 8, ), InkWell( onTap: () { Navigator.of(context).pop("tw"); }, child: Text( S.of(context).fantizhongwen, style: TextStyle( fontWeight: widget.locale != "zh" ? FontWeight.bold : FontWeight.normal, color: widget.locale != "zh" ? Color(0xFF32A060) : Color(0xFFA29E9E), fontSize: 16, ), ), ), ], ), ), GestureDetector( onTap: () { Navigator.of(context).pop(); }, child: Container( margin: EdgeInsets.only(left: 16, right: 16, top: 12, bottom: 32), padding: EdgeInsets.all(20), alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFF32A060), borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( color: Colors.black.withAlpha(25), offset: Offset(0, 1), blurRadius: 12, spreadRadius: 0) ], ), child: Text( S.of(context).quxiao, style: TextStyle( fontWeight: FontWeight.bold, color: Colors.white, fontSize: 16, ), ), ), ), ], ); } }