Repository navigation
Closed
Labels
Description
ADD MORE CUSTOMIZABLE PROPERTIES/FEATURES ON BUILT-IN CONTROLS.
These are some of my controls that I really like.
In flutter no need renderer to make this beautiful checkbox menu dialog with custom add text. hope we can do it in MAUI.
I write these code for reusable checkbox menus for the future flutter app.

BuildContext context, List<String> menus,
{String title = "Category", String hintText = "Add tags"}) {
Map<String, bool> items = Map<String, bool>();
menus.forEach((element) {
items[element] = true;
});
double h = 0;
if (menus.length >= 5) {
h = 270;
}
List<String> selecteds = menus.toList();
String newTag = "";
final Future<List<String>> action = showDialog(
context: context,
builder: (context) {
return StatefulBuilder(
// StatefulBuilder
builder: (context, setState) {
return AlertDialog(
actions: <Widget>[
Container(
width: 400,
height: null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
title,
style: TextStyle(fontSize: 20),
),
SizedBox(
height: 5,
),
Container(
height: 2,
color: themeData.colorScheme.secondary,
),
SizedBox(
height: 15,
),
Container(
height: h == 0 ? null : h,
child: SingleChildScrollView(
child: Column(children: [
Column(
children: List<Widget>.generate(menus.length,
(int index) {
return Column(
children: [
Divider(
height: 0,
),
CheckboxListTile(
value: items[menus[index]],
title: Text(menus[index]),
onChanged: (valueP) {
setState(() {
items.update(menus[index],
(value) => value = valueP);
selecteds.clear();
items.forEach((key, value) {
if (value) {
selecteds.add(key);
}
});
print(selecteds);
});
},
),
],
);
}),
),
SizedBox(
height: 5,
),
TextEditorCard(
hintText,
"",
false,
onTextChanged: (value) {
newTag = value;
},
),
]),
),
),
SizedBox(
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
side: BorderSide(
color: themeData.colorScheme.secondary)),
color: themeData.secondaryHeaderColor,
textColor: getBrightnessColor(
themeData.secondaryHeaderColor),
padding: EdgeInsets.all(8.0),
onPressed: () {
Navigator.of(context).pop(null);
},
child: Text(
"Cancel".toUpperCase(),
style: TextStyle(
fontSize: 14.0,
),
),
),
SizedBox(width: 20),
FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
side: BorderSide(
color: themeData.colorScheme.secondary)),
color: themeData.colorScheme.secondary,
textColor: getBrightnessColor(
themeData.colorScheme.secondary),
padding: EdgeInsets.all(8.0),
onPressed: () {
if (newTag.isNotEmpty &&
selecteds.contains(newTag) == false) {
selecteds.add(newTag);
print(selecteds);
}
Navigator.of(context).pop(selecteds);
},
child: Text(
"Save".toUpperCase(),
style: TextStyle(
fontSize: 14.0,
),
),
),
],
)
],
),
)
],
);
},
);
},
);
return (action != null) ? action : selecteds;
}```
Activity
nextcodelab commentedon Jan 5, 2021
Setting tile can also be achieved easily these code no need renderer this is my the code I have written in flutter...

nextcodelab commentedon Jan 5, 2021
On AppBar builder you can attach any kind of widget example you want dropdown menu... I hope we can do it in MAUI this code no need renderer...

nextcodelab commentedon Jan 5, 2021
In xamarin.forms we need to use plugin to have a round buttons and image... create renderer at all times is real PAIN..

These code is just few lines in flutter to achieved round image or buttons..
nextcodelab commentedon Jan 5, 2021
Creating a back button is very simple with svg or

I hope in MAUI support xaml path... in flutter no need renderer..
nextcodelab commentedon Jan 5, 2021
In xamarin.forms, this is really hard to make a beautiful search ,box with icon, all we need in xamarin is renderer.
That takes weeks to have features on that simple searchbox icon. But... in flutter this is just 1 minute to write that searchbox with icon..
[-]More Built-in Controls so that Developers have more focus on App Features.[/-][+]More Built-in Controls or Toolkit-Nugget-Package Controls so that Developers have more focus on App Features.[/+]nextcodelab commentedon Jan 6, 2021
Fully customizable text or label like this.. this is flutter.

Now flutter works on web I tried it and plan to create website using flutter ... I am still waiting for MAUI.NET... 👍