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.
project_telephony/lib/ui/widget/scaffold_theme_widget.dart

73 lines
2.2 KiB

2 years ago
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:project_telephony/model/sms_content_model.dart';
import 'package:project_telephony/utils/user_tool.dart';
import 'package:provider/provider.dart';
import '../../base/base_style.dart';
import '../../constants/api.dart';
import '../../model/network/api_client.dart';
import '../../model/network/base_model.dart';
import '../../model/user_info_model.dart';
import '../../providers/user_provider.dart';
import '../../utils/toast/cloud_toast.dart';
import '../user/content_details_page.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;
2 years ago
final VoidCallback onTap;
2 years ago
final int wid;
2 years ago
const ScaffoldThemeWidget({
Key? key,
required this.title,
required this.child,
required this.bottom,
this.isBorder = true,
2 years ago
this.isOpacity = true,
required this.onTap,
2 years ago
this.wid=162
2 years ago
}) : super(key: key);
2 years ago
@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,
title: Text(
widget.title,
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
2 years ago
titleSpacing: widget.wid.w,
2 years ago
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: widget.child,
2 years ago
bottomNavigationBar:
PloneBottom(
2 years ago
onTap: widget.onTap,
2 years ago
border: widget.isBorder,
opacity: widget.isOpacity ? 1 : 0.4,
2 years ago
text: widget.bottom,
).paddingOnly(bottom: 30.w),
);
}
}