In flutter code enableSlideIcon keyword not working - flutter

return LiquidSwipe(
pages: pages,
fullTransitionValue: 350.0,
enableLoop: false,
**enableSlideIcon: true,**
slideIconWidget: Icon(
Icons.arrow_back_ios,
color: dynamicColor,
),
);
in the above the line enableSlideIcon give error.

Instead of
**enableSlideIcon: true,**
Use
enableSideReveal : true,

Related

How to show border only value existing row in PaginatedDataTable2

I've created flutter with PaginatedDataTable2 as below source code
Expanded(
child: Theme(
data: Theme.of(context).copyWith(
cardColor: backgroundEndColor, dividerColor: Colors.white),
child: PaginatedDataTable2(
controller: paginatorController,
hidePaginator: true,
headingRowColor: MaterialStateColor.resolveWith(
(states) {
return Colors.white;
},
),
source: dataTable,
header: const ListHeader(),
columns: tableColumns,
columnSpacing: 0,
horizontalMargin: 10,
rowsPerPage: projectPartProgressController.rowsPerPage.value,
showCheckboxColumn: false,
)),
)
But the last page result is showing with horizontal border that no value inside as below
Is there any way to remove the border for those no value row?

Is there a KeyboardType for emojies in Flutter?

Is there a keyboardtype that shows the emojies of the keyboard or is there any package (not the EmojiPicker) that implements such for Flutter? Unfortunately I can't include the EmojiPicker in the normal keyboard. So the package is not an option for me. The best option would be one that calls the normal emoji keyboard. Are there any commands or functions for this?
There are some alternatives to emoji_picker package; https://pub.dev/packages?q=emoji+picker+keyboard but also the package you said it's deprecated and replaced by this one https://pub.dev/packages/emoji_picker_flutter
Just use emoji_picker_flutter: ^1.3.1
EmojiPicker(
onEmojiSelected: (category, emoji) {
// Do something when emoji is tapped (optional)
},
onBackspacePressed: () {
// Do something when the user taps the backspace button (optional)
},
textEditingController: textEditionController, // pass here the same [TextEditingController] that is connected to your input field, usually a [TextFormField]
config: Config(
columns: 7,
emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0), // Issue: https://github.com/flutter/flutter/issues/28894
verticalSpacing: 0,
horizontalSpacing: 0,
gridPadding: EdgeInsets.zero,
initCategory: Category.RECENT,
bgColor: Color(0xFFF2F2F2),
indicatorColor: Colors.blue,
iconColor: Colors.grey,
iconColorSelected: Colors.blue,
progressIndicatorColor: Colors.blue,
backspaceColor: Colors.blue,
skinToneDialogBgColor: Colors.white,
skinToneIndicatorColor: Colors.grey,
enableSkinTones: true,
showRecentsTab: true,
recentsLimit: 28,
noRecents: const Text(
'No Recents',
style: TextStyle(fontSize: 20, color: Colors.black26),
textAlign: TextAlign.center,
),
tabIndicatorAnimDuration: kTabScrollDuration,
categoryIcons: const CategoryIcons(),
buttonMode: ButtonMode.MATERIAL,
),
)

htmltoolbar and htmlEditor separate background color

How can we get htmltoolbar and htmlEditor separate background color
My work
Expectation:
htmlToolbarOptions: HtmlToolbarOptions(
dropdownFocusColor: borderColor,
dropdownBoxDecoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
),
buttonFillColor: yellowColor,
renderBorder: true,
toolbarType: ToolbarType.nativeExpandable,
textStyle: const TextStyle(color:Color(0xff344054),),
initiallyExpanded: false,
),
htmlEditorOptions: HtmlEditorOptions(
shouldEnsureVisible: true,
initialText: data.taskStatus,
hint: S.current.task_description,
spellCheck: true,
autoAdjustHeight: true,
adjustHeightForKeyboard: false,
),
otherOptions: const OtherOptions(height: 1500),
);

Flutter - PopupMenuButton - add an item manually after adding items from a list

I have a PopupMenuButton which displays items from a List.
List<Subject> subjects = [
Subject(
name: 'English',
iconFile: 'english.jpg',
),
Subject(
name: 'Mathematics',
iconFile: 'maths.jpg',
),
Subject(
name: 'Business Studies',
iconFile: 'business.jpg',
),
];
Below is PopupMenuButton code where the list is used to generate the menu items:
child: PopupMenuButton<Subject>(
color: Color.fromARGB(255, 95, 115, 231),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
onSelected: _changeSubject,
itemBuilder: (BuildContext context) {
return subjects.map((Subject subject) {
return PopupMenuItem<Subject>(
value: subject,
child: Text(subject.name),
);
}).toList();
},
),
This works as intended. Now I want to add another item "Sign Out" below "Business Studies" (as in this image link -> PopupMenuButton) and a divider between them. I don't want to add "Sign Out" to the subjects list. Is it possible to add another PopupMenuItem manually after all the generated items?
`
Subject signOutSubject = Subject(
name: 'Sign Out',
iconFile: 'signOut.jpg',
);
add to the end of the toList() function
toList()..add(PopupMenuItem<Subject>(
value: signOutSubject,
child: Text(signOutSubject.name),
);)
`
You can do like this.
result image
return PopupMenuButton(
color: const Color.fromARGB(255, 95, 115, 231),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
itemBuilder: (context) => <PopupMenuEntry>[
...subjects
.map((s) => PopupMenuItem(value: s, child: Text(s.name)))
.toList(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
value: "LogOut",
child: const Text('LogOut'),
),
],
);

Obscure text bool value is not updating in flutter

I am using pin_code_text_field package to create pin code textfields. But when I was updating the bool value used to obscure text. Bool value is not updating in pin code fields until I click on textfields.
Code was added below:
bool pinWasObscured = true;
Row(
children: [
PinCodeTextField(
maxLength: 4,
hideCharacter: pinWasObscured,
highlight: true,
highlightAnimation: true,
highlightAnimationBeginColor: Colors.black,
highlightAnimationEndColor: Colors.white,
highlightAnimationDuration: Duration(seconds: 5),
highlightColor: Color(0xFFF37021),
pinBoxDecoration: ProvidedPinBoxDecoration.underlinedPinBoxDecoration,
maskCharacter: "*",
pinTextStyle: TextStyle(
fontSize: 15.sp,
fontWeight: FontWeight.bold,
),
pinBoxWidth: SizeConfig.blockSizeHorizontal! * 12,
pinBoxHeight: SizeConfig.blockSizeHorizontal! * 10,
autofocus: false,
controller: pinController,
defaultBorderColor: Colors.black26,
),
SizedBox(width: 10),
IconButton(
icon: pinWasObscured
? Icon(Icons.visibility_off_outlined)
: Icon(Icons.visibility_outlined),
onPressed: () {
setState(() {
pinWasObscured = !pinWasObscured;
});
},
),
],
),
the issue is that you are also updating the value of the "hideCharacter" on the click of item. you dont have to update the hideCharacter value everytime.
instead you have to set the value to true if you want to hide the character and false to show.