aman-satu-flutter/lib/widgets/fields/line_tile.dart

62 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:satu/shared/app_colors.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'note_text.dart';
class LineTile extends StatelessWidget {
const LineTile(this.text, { required this.onTap, this.labelText });
final String text;
final String? labelText;
final Function() onTap;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (labelText != null)
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 5.0),
child: NoteText(labelText ?? ''),
),
Container(
decoration: const BoxDecoration(
color: whiteColor
),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: onTap,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 12.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
text,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.normal,
color: textColor
),
),
SizedBox(
width: 20,
child: const Icon(
Icons.chevron_right,
color: textColor,
),
)
],
),
),
),
),
),
],
);
}
}