update
This commit is contained in:
parent
d3a4b45603
commit
28cb4cac67
4 changed files with 101 additions and 9 deletions
|
|
@ -1,13 +1,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
||||
|
||||
class InputWidget extends StatelessWidget {
|
||||
final String label;
|
||||
final TextEditingController controller;
|
||||
final bool? password;
|
||||
final OnChangedCallback? onChanged;
|
||||
|
||||
const InputWidget({super.key, required this.label, required this.controller, this.password});
|
||||
const InputWidget({super.key, required this.label, required this.controller, this.password, this.onChanged});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -29,6 +31,7 @@ class InputWidget extends StatelessWidget {
|
|||
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
||||
obscureText: password ?? false,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
37
lib/widgets/warning_widget.dart
Normal file
37
lib/widgets/warning_widget.dart
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
|
||||
class WarningWidget extends StatelessWidget {
|
||||
final String text;
|
||||
final String warning;
|
||||
const WarningWidget({super.key, required this.text, required this.warning});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromARGB(102, 121, 15, 5),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(width: 2, color: const Color.fromARGB(255, 42, 2, 2))),
|
||||
// width: 200,
|
||||
// height: 100,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Center(
|
||||
child: TextWidget(
|
||||
text: text,
|
||||
size: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(16),
|
||||
TextWidget(
|
||||
text: warning,
|
||||
size: 14,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue