12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import 'package:flutter/material.dart';
- import 'package:flutter/cupertino.dart';
- class YSBase extends StatefulWidget {
- final Widget yschild;
- final String ystitle;
- final Widget ysright;
- final Color yscolor;
- const YSBase({Key key, this.yschild,this.ystitle,this.ysright, this.yscolor}) : super(key: key);
- @override
- _YSBaseState createState() => _YSBaseState();
- }
- class _YSBaseState extends State<YSBase> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: widget.yscolor==null?Colors.white:widget.yscolor,
- appBar: CupertinoNavigationBar(
- backgroundColor: Colors.white,
- border: Border(bottom: BorderSide(color: Color(0xFFEEEEEE),width: 0.5)),
- leading: Container(
- height: 30,
- width: 20,
- margin: EdgeInsets.only(right: 35),
- child: CupertinoButton(
- padding: EdgeInsets.all(0),
- child: Icon(Icons.arrow_back_ios,size: 20,color: Color(0xFF000000),),
- onPressed: (){
- FocusScope.of(context).unfocus();
- Navigator.pop(context);
- },
- ),
- ),
- middle: Text(widget.ystitle,style: TextStyle(color: Color(0xFF000000),fontSize: 16,decoration: TextDecoration.none,fontWeight: FontWeight.w600),textAlign: TextAlign.center,),
- trailing: widget.ysright,
- ),
- body: SingleChildScrollView(
- child: widget.yschild,
- ),
- );
- }
- }
|