enableMessageReading method
Implementation
Widget enableMessageReading() {
return Padding(
padding: const EdgeInsets.only(top: 15.0),
child: Container(
width: Get.width,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: ListTile(
title: Align(
alignment: Alignment.centerLeft,
child: TextWidget(
text: "Sync Messages",
color: 0xff000000,
fontSize: 15,
fontWeight: FontWeight.w600,
textAlign: TextAlign.center,
),
),
subtitle: Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Column(
children: [
TextWidget(
text:
"By syncing messages with your account will help in automatically updating your expenses, bills, savings and "
"tracking of your expenditures.",
color: 0xff707070,
fontSize: 12,
fontWeight: FontWeight.w300,
textAlign: TextAlign.start,
),
Obx(() => Padding(
padding: const EdgeInsets.only(top: 15.0),
child: c.isSyncing.value==false?InkWell(
onTap: () async {
c.isSyncing.value=true;
MessageFunction().submitMessagesToAI().then((value) => c.isSyncing.value=false).onError((error, stackTrace) => c.isSyncing.value=false);
},
child: button_widgets(
widget: TextWidget(
text: "Sync Now",
color: 0xffFFFFFF,
fontSize: 15,
fontWeight: FontWeight.w300,
textAlign: TextAlign.center,
),
height: 47,
width: Get.width,
radius: 10,
color: greenIntColor,
borderColor: greenIntColor),
):
SizedBox(
height: 30,
width: 30,
child: CircularProgressIndicator(
color: Color(greenIntColor),
),
),
)),
],
),
),
),
),
),
);
}