parent
a37be431e1
commit
acbc775c06
@ -1,5 +1,5 @@
|
|||||||
import 'package:ansu_ui/styles/as_colors.dart';
|
import 'package:ansu_ui/styles/as_colors.dart';
|
||||||
import 'package:ansu_ui/tabbar/as_tab_indicator.dart';
|
import 'package:ansu_ui/bar/as_tab_indicator.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// ## 安速Tabbar
|
/// ## 安速Tabbar
|
@ -0,0 +1,34 @@
|
|||||||
|
import 'package:ansu_ui/utils/screen_adapter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
///安速抽屉
|
||||||
|
class ASDrawer extends StatefulWidget {
|
||||||
|
///子组件
|
||||||
|
final Widget child;
|
||||||
|
ASDrawer({Key key, @required this.child}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ASDrawerState createState() => _ASDrawerState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ASDrawerState extends State<ASDrawer> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Align(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
child: SizedBox(
|
||||||
|
height: screenHeight - statusBarHeight,
|
||||||
|
width: screenWidth - 44.w,
|
||||||
|
child: Material(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(34.w),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: widget.child,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
import 'package:ansu_ui/ansu_ui.dart';
|
||||||
|
|
||||||
|
double statusBarHeight = ScreenUtil().statusBarHeight;
|
||||||
|
double screenHeight = ScreenUtil().screenHeight;
|
||||||
|
double screenWidth = ScreenUtil().screenWidth;
|
Loading…
Reference in new issue