feat :
1 - search in map with api 2 - show details in selected location
This commit is contained in:
@@ -3,9 +3,16 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_color.dart';
|
||||
|
||||
class BaseBottomSheet extends StatelessWidget {
|
||||
const BaseBottomSheet({super.key, required this.child, this.height, this.bgColor});
|
||||
const BaseBottomSheet({
|
||||
super.key,
|
||||
this.child,
|
||||
this.height,
|
||||
this.bgColor,
|
||||
this.rootChild,
|
||||
}):assert(child==null || rootChild==null, 'You can only provide one of child or rootChild');
|
||||
|
||||
final Widget child;
|
||||
final Widget? child;
|
||||
final Widget? rootChild;
|
||||
final double? height;
|
||||
final Color? bgColor;
|
||||
|
||||
@@ -51,8 +58,8 @@ class BaseBottomSheet extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height:8),
|
||||
Expanded(child: SingleChildScrollView(child: child)),
|
||||
SizedBox(height: 8),
|
||||
Expanded(child: rootChild ?? SingleChildScrollView(child: child)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class ListItem2 extends StatelessWidget {
|
||||
const ListItem2({
|
||||
class ExpandableListItem2 extends StatelessWidget {
|
||||
const ExpandableListItem2({
|
||||
super.key,
|
||||
required this.index,
|
||||
required this.child,
|
||||
@@ -115,3 +115,98 @@ class ListItem2 extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ListItem2 extends StatelessWidget {
|
||||
const ListItem2({
|
||||
super.key,
|
||||
required this.index,
|
||||
required this.child,
|
||||
required this.labelColor,
|
||||
required this.labelIcon,
|
||||
this.onTap,
|
||||
|
||||
this.labelIconColor = AppColor.mediumGreyDarkHover,
|
||||
});
|
||||
|
||||
final int index;
|
||||
final Widget child;
|
||||
final Color labelColor;
|
||||
final String labelIcon;
|
||||
final Color? labelIconColor;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
margin: const EdgeInsets.fromLTRB(0, 0, 10, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: labelColor,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: AppColor.lightGreyNormalHover),
|
||||
),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.centerRight,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 75,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.zero,
|
||||
bottomRight: Radius.circular(8),
|
||||
topLeft: Radius.zero,
|
||||
topRight: Radius.circular(8),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
width: 16.w,
|
||||
height: 16.h,
|
||||
//TODO
|
||||
colorFilter: ColorFilter.mode(
|
||||
labelIconColor ?? AppColor.mediumGreyDarkActive,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Positioned(
|
||||
right: -12,
|
||||
child: Container(
|
||||
width: index < 999 ? 24 : null,
|
||||
height: index < 999 ? 24 : null,
|
||||
padding: EdgeInsets.all(2),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.greenLightHover,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
border: Border.all(width: 0.50, color: AppColor.greenDarkActive),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
(index + 1).toString(),
|
||||
style: AppFonts.yekan12.copyWith(color: Colors.black),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user