Initial Flutter project added

This commit is contained in:
Abhishek Mali
2025-11-28 10:14:30 +05:30
commit 1df218c097
141 changed files with 5679 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
class PrimaryButton extends StatelessWidget {
final String label;
final VoidCallback onTap;
final bool busy;
const PrimaryButton({super.key, required this.label, required this.onTap, this.busy = false});
@override
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: busy ? null : onTap,
style: ElevatedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 14), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))),
child: busy ? const SizedBox(height: 18, width: 18, child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white)) : Text(label, style: const TextStyle(fontSize: 16)),
),
);
}
}

View File

@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
class RoundedInput extends StatelessWidget {
final TextEditingController controller;
final String hint;
final TextInputType keyboardType;
final bool obscure;
final int? maxLines;
const RoundedInput({
super.key,
required this.controller,
required this.hint,
this.keyboardType = TextInputType.text,
this.obscure = false,
this.maxLines = 1,
});
@override
Widget build(BuildContext context) {
final radius = BorderRadius.circular(12);
return TextField(
controller: controller,
keyboardType: keyboardType,
obscureText: obscure,
maxLines: maxLines,
decoration: InputDecoration(
filled: true,
hintText: hint,
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
border: OutlineInputBorder(borderRadius: radius, borderSide: BorderSide.none),
),
);
}
}