You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../base/base_style.dart';
import '../widget/plone_back_button.dart';
import '../widget/plone_bottom.dart';
class ScaffoldThemeWidget extends StatefulWidget {
final String title;
final Widget child;
final String bottom;
final bool isBorder;
final bool isOpacity;
final VoidCallback onTap;
final int wid;
const ScaffoldThemeWidget({
Key? key,
required this.title,
required this.child,
this.bottom='',
this.isBorder = true,
this.isOpacity = true,
required this.onTap,
this.wid=162
}) : super(key: key);
@override
_ScaffoldThemeWidgetState createState() => _ScaffoldThemeWidgetState();
}
class _ScaffoldThemeWidgetState extends State<ScaffoldThemeWidget> {
// final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
elevation: 0,
centerTitle: true,
title: Text(
widget.title,
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
// titleSpacing: widget.wid.w,
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: widget.child,
bottomNavigationBar:Offstage(
offstage: widget.bottom.isEmpty,
child: PloneBottom(
onTap: widget.onTap,
border: widget.isBorder,
opacity: widget.isOpacity ? 1 : 0.4,
text: widget.bottom,
).paddingOnly(bottom: 30.w),
)
);
}
}