Common Update 1.0
parent
4e2b0950e8
commit
f2ccd5ef26
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20.243" height="17.99" viewBox="0 0 20.243 17.99">
|
||||||
|
<path id="edit" d="M14.149,3.02l3.17,3.17a.344.344,0,0,1,0,.485L9.643,14.351l-3.261.362a.684.684,0,0,1-.756-.756L5.989,10.7,13.664,3.02A.344.344,0,0,1,14.149,3.02Zm5.693-.8L18.127.5a1.374,1.374,0,0,0-1.94,0L14.943,1.745a.344.344,0,0,0,0,.485l3.17,3.17a.344.344,0,0,0,.485,0l1.244-1.244A1.374,1.374,0,0,0,19.842,2.216ZM13.5,12.263v3.578H2.249V4.595h8.076a.432.432,0,0,0,.3-.123L12.03,3.066a.422.422,0,0,0-.3-.72H1.687A1.687,1.687,0,0,0,0,4.033V16.4A1.687,1.687,0,0,0,1.687,18.09H14.058A1.687,1.687,0,0,0,15.744,16.4V10.858a.422.422,0,0,0-.72-.3l-1.406,1.406A.432.432,0,0,0,13.5,12.263Z" transform="translate(0 -0.1)" fill="#28323a"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 740 B |
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:mc_common_app/widgets/show_fill_button.dart';
|
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||||
|
|
||||||
class ShowCardButton extends StatelessWidget {
|
class ShowCardButton extends StatelessWidget {
|
||||||
String title;
|
String title;
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mc_common_app/theme/colors.dart';
|
||||||
|
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
|
||||||
|
|
||||||
|
class MenuTabs extends StatefulWidget {
|
||||||
|
int selectedIndex;
|
||||||
|
List<DropValue> dropList;
|
||||||
|
Function(DropValue value) onSelect;
|
||||||
|
Color? selectedColor;
|
||||||
|
|
||||||
|
|
||||||
|
MenuTabs(this.selectedIndex, this.dropList, {required this.onSelect, this.selectedColor});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MenuTabs> createState() => _RoleTypeTabState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RoleTypeTabState extends State<MenuTabs> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 35,
|
||||||
|
child: ListView.separated(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedIndex = index;
|
||||||
|
widget.onSelect(widget.dropList[index]);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 45,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: widget.selectedIndex == index ? widget.selectedColor ?? MyColors.darkIconColor : Colors.white,
|
||||||
|
border: Border.all(color: widget.selectedIndex == index ? widget.selectedColor ?? MyColors.darkIconColor : MyColors.darkPrimaryColor, width: 1.5),
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(0)),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
widget.dropList[index].value,
|
||||||
|
style: TextStyle(
|
||||||
|
color: widget.selectedIndex == index ? MyColors.white : Colors.black,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return 12.width;
|
||||||
|
},
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 21),
|
||||||
|
itemCount: widget.dropList.length,
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue