mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-11 01:38:56 +03:30
90 lines
2.5 KiB
Dart
Executable File
90 lines
2.5 KiB
Dart
Executable File
import 'package:cssd/models/users_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class TransferDataBox extends StatelessWidget {
|
|
final Users? user;
|
|
final Function(String)? onTap;
|
|
final bool isClicked;
|
|
final Color? clickColor;
|
|
|
|
const TransferDataBox({
|
|
Key? key,
|
|
required double deviceBlockSize,
|
|
this.user,
|
|
this.onTap,
|
|
this.clickColor,
|
|
this.isClicked = false,
|
|
}) : _deviceBlockSize = deviceBlockSize,
|
|
super(key: key);
|
|
|
|
final double _deviceBlockSize;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: () {
|
|
onTap!(user!.id);
|
|
},
|
|
child: Card(
|
|
elevation: 1,
|
|
child: Container(
|
|
decoration: isClicked
|
|
? BoxDecoration(
|
|
borderRadius: BorderRadius.all(
|
|
Radius.circular(10),
|
|
),
|
|
border: Border.all(color: clickColor!, width: 2.0),
|
|
)
|
|
: BoxDecoration(),
|
|
padding: EdgeInsets.all(8),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: <Widget>[
|
|
Container(
|
|
padding: const EdgeInsets.all(6.0),
|
|
child: Text(
|
|
user!.id.toString(),
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 5 * _deviceBlockSize,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 3 * _deviceBlockSize,
|
|
),
|
|
// Spacer(),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
width: 30 * _deviceBlockSize,
|
|
child: Text(
|
|
user!.userName,
|
|
style: TextStyle(
|
|
fontSize: 3 * _deviceBlockSize,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
width: 30 * _deviceBlockSize,
|
|
child: Text(
|
|
user!.phoneNumber,
|
|
style: TextStyle(
|
|
fontSize: 3 * _deviceBlockSize,
|
|
fontWeight: FontWeight.w700,
|
|
color: Colors.grey,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|