update
This commit is contained in:
parent
5469c484e1
commit
c87b10a050
11 changed files with 241 additions and 39 deletions
|
|
@ -12,8 +12,8 @@ class ButtonWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.white, // text color
|
||||
backgroundColor: const Color.fromARGB(255, 54, 140, 136), // background color
|
||||
foregroundColor: Color(0xFF8E44AD), // text color
|
||||
backgroundColor: const Color(0xFFE8DAEF), // background color
|
||||
side: const BorderSide(color: Color.fromARGB(55, 255, 255, 255)), // border color
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(26), // rounded corners
|
||||
|
|
|
|||
43
lib/widgets/dropdown_widget.dart
Normal file
43
lib/widgets/dropdown_widget.dart
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class DropDownWidget extends StatelessWidget {
|
||||
final String label;
|
||||
final List list;
|
||||
final String listTitle;
|
||||
const DropDownWidget({super.key, required this.label, required this.list, required this.listTitle});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label,
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
||||
)),
|
||||
const Gap(8),
|
||||
DropdownMenu(
|
||||
initialSelection: '',
|
||||
dropdownMenuEntries: [
|
||||
for (var item in list) DropdownMenuEntry(label: item[listTitle].toString(), value: item[listTitle])
|
||||
],
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
),
|
||||
|
||||
// DropdownButton(
|
||||
// isExpanded: true,
|
||||
// value: list,
|
||||
// onChanged: (_) {},
|
||||
// items: list.map((item) {
|
||||
// return DropdownMenuItem(
|
||||
// value: item,
|
||||
// child: Text(item, overflow: TextOverflow.ellipsis, maxLines: 1),
|
||||
// );
|
||||
// }).toList(),
|
||||
// ),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
33
lib/widgets/input_widget.dart
Normal file
33
lib/widgets/input_widget.dart
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class InputWidget extends StatelessWidget {
|
||||
final String label;
|
||||
final TextEditingController controller;
|
||||
final bool? password;
|
||||
|
||||
const InputWidget({super.key, required this.label, required this.controller, this.password});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label,
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
||||
)),
|
||||
const Gap(8),
|
||||
TextField(
|
||||
controller: controller,
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
||||
obscureText: password ?? false,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,12 +3,13 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
|
||||
class TextWidget extends StatelessWidget {
|
||||
final String text;
|
||||
final double? size;
|
||||
|
||||
const TextWidget({super.key, required this.text});
|
||||
const TextWidget({super.key, required this.text, this.size});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(text,
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32)));
|
||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: size ?? 32)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue