mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
27 lines
709 B
Dart
27 lines
709 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tablet_app/constants.dart';
|
|
|
|
class TextFieldContainer extends StatelessWidget {
|
|
final Widget? child;
|
|
final Color? color;
|
|
const TextFieldContainer({
|
|
Key? key,
|
|
this.child,
|
|
this.color = kBackgroundGrey,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Size size = MediaQuery.of(context).size;
|
|
return Container(
|
|
margin: EdgeInsets.symmetric(vertical: 10),
|
|
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 5),
|
|
width: size.width * 0.8,
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
borderRadius: BorderRadius.circular(29),
|
|
),
|
|
child: child,
|
|
);
|
|
}
|
|
} |