63 lines
1.8 KiB
Dart
Executable File
63 lines
1.8 KiB
Dart
Executable File
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class BranchCard extends StatelessWidget {
|
|
final String clientName;
|
|
final String branchName;
|
|
final bool isSelected;
|
|
final VoidCallback onTap;
|
|
|
|
const BranchCard({
|
|
Key? key,
|
|
required this.clientName,
|
|
required this.branchName,
|
|
required this.isSelected,
|
|
required this.onTap,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: onTap,
|
|
borderRadius: BorderRadius.circular(8),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: isSelected ? Color(0xFF00999E) : Color(0xFFF0F9F9),
|
|
borderRadius: BorderRadius.circular(8),
|
|
border: Border.all(
|
|
color: Color(0xFF00999E),
|
|
width: 1.5,
|
|
),
|
|
),
|
|
padding: EdgeInsets.all(12),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
clientName,
|
|
style: GoogleFonts.poppins(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: isSelected ? Colors.white : Color(0xFF00999E),
|
|
),
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
SizedBox(height: 4),
|
|
Text(
|
|
branchName,
|
|
style: GoogleFonts.poppins(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w400,
|
|
color: isSelected ? Color(0xFFFDFDFD) : Color(0xFF000000),
|
|
),
|
|
maxLines: 1,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |