htmltoolbar and htmlEditor separate background color - flutter

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),
);

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?

How to make rating bar non clickable in flutter

How to make default flutter ratingbar non clickable ?
I have to disable rating option once user give feedback. How do I do it.
RatingBar(
itemSize: 35,
initialRating: 0,
glowColor: Colors.transparent,
direction: Axis.horizontal,
allowHalfRating: false,
tapOnlyMode: false,
itemCount: 5,
itemPadding: const EdgeInsets.symmetric(horizontal: 0.0),
ratingWidget: RatingWidget(
full: Image.asset(img_star_rating_fill, width: 25.w, height: 25.h),
// full: const Icon(Icons.star, color:yellow_FFC800),
half: Image.asset(img_star_rating_fill, width: 25.w, height: 25.h),
// half: const Icon(Icons.star_half, color:yellow_FFC800,),
empty:
Image.asset(img_star_rating_empty, width: 25.w, height: 25.h),
),
// empty: const Icon(Icons.star_outline, color:gray_868590,)),
onRatingUpdate: (value) {
setState(() {
_ratingValue = value;
printData(
'Rating to consultation booking ID', _ratingValue.toString());
controller
.callRateConsultationAPI(
widget.i,
controller.pastBookingList[widget.i].id.toString(),
value.toString())
.then((value) {
setState(() {
// ratingBar.setFocusable(false);
});
});
});
})
You can set ignoreGestures to true, like this:
RatingBar(
ignoreGestures: true, // <---- add this
itemSize: 35,
initialRating:0,
glowColor: Colors.transparent,
direction: Axis.horizontal,
allowHalfRating: false,
...
)
IgnorePointer(child:RatingWidget)

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,
),
)

Searchbox with filter in flutter

I have a question regarding this library https://pub.dev/packages/dropdown_search. I am trying to implement dropdown with searchbox, whenever I type in any value it doesn't show in the box and nothing is being returned in dropdown. How can I set this up properly?
DropdownSearch(
mode: Mode.MENU,
dropdownSearchDecoration: InputDecoration(
fillColor: Colors.white,
filled: true,
border: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0xFF01689A)),
),
),
showAsSuffixIcons: true,
showClearButton: true,
items: _countryList.map((Country item) {
return item.label;
}).toList()
),
It is because of searchDelay field. When you make it 0 seconds it will work properly and become instant search.
DropdownSearch<String>(
searchDelay: Duration(milliseconds: 0),
showSearchBox: true,
showClearButton: true,
mode: Mode.MENU,
showSelectedItems: true,
items: transactionState.drop,
label: "Cari Hesap",
hint: "Cari Hesap Girin",
selectedItem: transactionState.selecteditem,
//popupItemDisabled: (String s) => s.startsWith('I'),
onChanged: (str){
transactionState.getBakiye(str!);
transactionState.selecteditem = str;
},
),

How to add cursor For PinFieldAutoFill flutter

There is no cursor while entering OTP, How can add Cursor in pinFieldAutoFill. I am using the sms_autofill: ^1.2.5 package.
PinFieldAutoFill(
autofocus: true,
keyboardType: TextInputType.number,
decoration: UnderlineDecoration(
textStyle: TextStyle(
fontSize: 44.sp,
fontWeight: FontWeight.bold,
color: kDarkBlue),
colorBuilder: FixedColorBuilder(
Colors.grey),
),
currentCode: authService
.loginMobileOTP, // prefill with a code
onCodeSubmitted: (_) async {
authService.login(
context, _scaffoldKey);
},
onCodeChanged: (value) {
authService.loginMobileOTP =
value;
},
codeLength:
6 //code length, default 6
),
Please enable cursor option in "sms_autofill" package, class constructer "PinInputTextField".
Sharing reference code
return PinInputTextField(
pinLength: widget.codeLength,
decoration: widget.decoration,
cursor: Cursor(
width: 2,
height: 40,
color: Colors.red,
radius: Radius.circular(1),
enabled: true,
),