cosmetic changes on global components
This commit is contained in:
@@ -2,23 +2,34 @@ import 'package:flutter/material.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class NcButton extends StatelessWidget {
|
||||
const NcButton({super.key, required this.caption, required this.backgroundColor, required this.captionColor, this.onPressed});
|
||||
const NcButton({
|
||||
super.key,
|
||||
required this.caption,
|
||||
required this.backgroundColor,
|
||||
required this.captionColor,
|
||||
this.onPressed,
|
||||
required this.width,
|
||||
required this.height,
|
||||
});
|
||||
|
||||
final String caption;
|
||||
final Color backgroundColor;
|
||||
final Color captionColor;
|
||||
final double width;
|
||||
final double height;
|
||||
final void Function()? onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 500,
|
||||
height: 100,
|
||||
width: width,
|
||||
height: height,
|
||||
child: ElevatedButton(
|
||||
onPressed: onPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: backgroundColor,
|
||||
foregroundColor: captionColor,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 20),
|
||||
backgroundColor: Colors.black,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NCTextField extends StatelessWidget {
|
||||
const NCTextField({super.key, required this.hintText, required this.controller});
|
||||
|
||||
final String hintText;
|
||||
|
||||
final TextEditingController controller;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
controller: controller,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderSide: const BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderSide: const BorderSide(color: Colors.black),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user