You've already forked flutter-rp-example
First commit
This commit is contained in:
27
lib/widgets/components/reflex_box.dart
Normal file
27
lib/widgets/components/reflex_box.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../globals.dart';
|
||||
|
||||
class ReflexBox extends StatefulWidget {
|
||||
final Widget child;
|
||||
final Color? color;
|
||||
|
||||
const ReflexBox({Key? key, this.color, required this.child})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_ReflexBoxState createState() => _ReflexBoxState();
|
||||
}
|
||||
|
||||
class _ReflexBoxState extends State<ReflexBox> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.0))),
|
||||
//backgrround
|
||||
color: widget.color ?? Globals.RP_BG_DARK_COLOR,
|
||||
child: widget.child);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user