Flutter Dynamic Theme Change | Local Push Notification | Get Storage | Beginners App iOS | Android

Flutter Dynamic Theme Change | Local Push Notification | Get Storage | Beginners App iOS | Android

dbestech

2 года назад

99,062 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

PREMIUM SHORTS
PREMIUM SHORTS - 03.05.2022 07:48

for android u may not get notification so add icon attribute in AndroidNotificationDetails

AndroidNotificationDetails(

'your channel id', 'your channel name',
importance: Importance.max, priority: Priority.high,
icon: 'app_icon'

)

like above
thank you

Ответить
جلال المهندس
جلال المهندس - 06.09.2023 16:14

My friends ihave application for learning English language with video and voice are you help me with sqlflite

Ответить
Jakob Zick
Jakob Zick - 03.09.2023 13:33

Really good video, can I use it for my own app with a few changes?

Ответить
Harun petekkaya
Harun petekkaya - 09.08.2023 01:33

hello ,
I have error , help me pls. :(
---------------------
" * What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_native_timezone' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 "
---------------------

My informations :

ext.kotlin_version = '1.7.10'
classpath 'com.android.tools.build:gradle:7.3.0'
sdk: '>=3.0.6 <4.0.0'

Ответить
joão pedro ferreira de souza
joão pedro ferreira de souza - 21.07.2023 07:59

thanks main, it's helpfull

Ответить
sina saffar
sina saffar - 03.07.2023 20:37

hello
I encountered this error when I tried to run the program, and when I delete the flutter_native_timeZone plugin, it does not give an error.
A problem occurred configuring project ':flutter_native_timezone'.
> Could not resolve all files for configuration ':flutter_native_timezone:classpath'.

Ответить
Phumlani Nxumalo
Phumlani Nxumalo - 30.06.2023 16:23

hey im running the app in chrome but the notifications do not display, why? am i wrong with using chrome?

Ответить
Phumlani Nxumalo
Phumlani Nxumalo - 29.06.2023 16:31

await flutterLocalNotificationsPlugin.initialize(
initializationSettings,
onSelectNotification: selectNotification);
}
hey, may you plz help here, the (onSelectNotification) is giving an error. it says the name is undefined. what can i do.

Ответить
work station
work station - 31.05.2023 15:08

i am following your code but when i create local notification i am facing error in onSelectNotification ex parameter not defined i can't fix it can u help me with that

Ответить
AJAY MOURYA
AJAY MOURYA - 27.05.2023 10:58

In NotifyHelper
onSelectNotification not work under flutterLocalNotificationsPlugin.initialize();

Ответить
Yuki Sato
Yuki Sato - 21.05.2023 12:35

why i get error onSelectNotification: selectNotification. is there a way to fix it?

Ответить
I Can Done
I Can Done - 22.04.2023 16:23

Hello, I now encounter another error for the scheduledNotification, the function is not working well as the message 'theme changes 5 seconds ago' is not displayed after 5 second. It have the notification sound after the duration and I only able view the message when I pull down the control center instead of displaying same with the first notification. Any solution to solve it? Anybody have encounter this issues before and solved it?

Ответить
I Can Done
I Can Done - 21.04.2023 15:19

Hello, I am a new learner and have limitation on modifying or debugging the code thus I need your help for Local Push Notification. Please update the code if available. I encounter some errors and unable executing the code, it seems onDidReceiveLocalNotification have change to onDidReceiveNotificationResponse. Please update it with the parameter and functions that you defined previously, I can't apply the selectNotification by changing the details to selectNotification that defined
notificationsPlugin.initialize(
initializationSettings,
onDidReceiveNotificationResponse: (selectNotification) {},
);

and the NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
await notificationsPlugin.show(
0,
'Theme Change',
'You change your theme back!',
notificationDetails,
);
}
which I unable to change to title and body and it will display Undefined name error. I have email you yesterday but not yet get any reply and I need your help. Appreciate your help, thank you.

Appreciate all helping if anyone able to solve my problem or sharing your code with the latest version. Thank you.

Ответить
Nani Queen Queen
Nani Queen Queen - 18.04.2023 04:39

Plz can u help

Ответить
raden res
raden res - 14.03.2023 16:45

Really good content, i want to ask something , where can i get the appicon.png file

Ответить
nur hilwani
nur hilwani - 08.03.2023 10:25

I have problem with androidManifest

Ответить
Abhijeet Ranjan
Abhijeet Ranjan - 13.02.2023 09:46

for those who are getting error while theme changing like "type 'bool' is not a subtype of type 'String'" use this: 



class ThemeService{

final _box = GetStorage();
final _key = 'isDarkMode';

ThemeMode get theme => _loadThemeFromBox() ? ThemeMode.dark : ThemeMode.light;

// according to the string the code is changing bool value
bool _loadThemeFromBox() => _box.read(_key) == 'true' ? true : false;

// in this the bool value is parsed in string
_saveThemeToBox(bool isDarkMode) => _box.write(_key, isDarkMode.toString());

void switchTheme() {
Get.changeThemeMode(_loadThemeFromBox() ? ThemeMode.light : ThemeMode.dark);

// here we are changing according to every selection
_saveThemeToBox(!_loadThemeFromBox());
}
}

Ответить
loic diffo
loic diffo - 21.01.2023 13:14

hello , i keep on having this error
The named parameter 'onSelectNotification' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'onSelectNotification'.

await flutterLocalNotificationsPlugin.initialize(
initializationSettings,
onSelectNotification: selectNotification);

on this area, i did everything i could , i am a newbie i don't know how to fix futhere

Ответить
saisri maddhukuri
saisri maddhukuri - 11.01.2023 11:49

In flutterLocalNotificationsPlugin "onSelectNotification" is not working for android

Ответить
Dzaki
Dzaki - 28.12.2022 13:09

Can I got GitHub for source code?

Ответить
Ömer Müştekin
Ömer Müştekin - 26.12.2022 23:04

Thanks buddy u are the best. Just u can past more quickly when u telling something really basic things like theme you know. When ı was see your video duration ı thoguht this is more complicated then ı thoguht but u just spoke about theme around 30+ minutes. :D

Ответить
Programmer Unity
Programmer Unity - 16.12.2022 15:20

Asslaumaleikum. I have a problem with IOSInitializationSettings. The package doesn't have class name IOSInitializationSettings

Ответить
Mohammad Ebrahim
Mohammad Ebrahim - 02.12.2022 22:22

what editor are you using

Ответить
Amr Elnemr
Amr Elnemr - 28.11.2022 10:37

can anyone help me with this :)
Android resource linking failed
ERROR:C:\Users\HP\AndroidStudioProjects\awesome_todo_app\build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:22: AAPT: error: resource mipmap/ic_launcher (aka com.example.awesome_todo_app:mipmap/ic_launcher) not found.

Ответить
Mazharul Islam Shimanto
Mazharul Islam Shimanto - 19.11.2022 11:52

I am facing error in this line
initializeNotification() async {
//tz.initializeTimeZones();
final IOSInitializationSettings initializationSettingsIOS = IOSInitializationSettings(
requestSoundPermission: false,
requestBadgePermission: false,
requestAlertPermission: false,
onDidReceiveLocalNotification: onDidReceiveLocalNotification
);
The error is there is no class name as IOSInitilaizationSettings . Did you created the class?

Ответить
Ahmed Ibrahem Aboelnasr
Ahmed Ibrahem Aboelnasr - 17.11.2022 00:40

if someone has a problem in solving the issue of converting the theme from light mode to the dark mode
this is the solution :
class Themes {
static final light = ThemeData.light().copyWith(
appBarTheme:const AppBarTheme(
backgroundColor: primaryClr,
),
brightness: Brightness.light,
);

static final dark = ThemeData.dark().copyWith(
appBarTheme:const AppBarTheme(
backgroundColor: darkGreyClr,
),
brightness: Brightness.dark,
);

Ответить
Ahmed Ibrahem Aboelnasr
Ahmed Ibrahem Aboelnasr - 16.11.2022 23:13

the dark theme using primarycolor or primaryswitch is not working plz tell me how can i do it

Ответить
Kahan
Kahan - 27.10.2022 22:57

The depth your explanations is stunning.

Ответить
Bloodcon
Bloodcon - 29.09.2022 22:13

what i should do to change the notification icon size

Ответить
Sa'ad Ghazal
Sa'ad Ghazal - 28.09.2022 16:32

hi guys where is the appicon.png ?

Ответить
Fawad Ahmed
Fawad Ahmed - 26.09.2022 00:43

if anyone want running code , pin me
i will share you via mail or any other channel
Thanks :)

Ответить
Abdul Mannan Saipi
Abdul Mannan Saipi - 24.09.2022 11:21

Asalamualaikum, i have an error an onSectNotification it says(The named parameter 'onSelectNotification' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name)

Ответить
Fawad Ahmed
Fawad Ahmed - 23.09.2022 00:10

Hi,
is this for beginners also? like have you explained all the things in details which you have used in this push notification project?

Ответить
Soothing Life
Soothing Life - 19.09.2022 19:05

By this date 2022-09-19 using Flutter Local Notification IOSInitalizationSettings became DarwinInitializationSettings

Ответить
LivLife
LivLife - 19.09.2022 09:47

Oh my gosh What I exactly looking for I love you dbestech

Ответить
Duy Nguyễn Văn
Duy Nguyễn Văn - 24.08.2022 12:48

Saeee hahahah, you just have to play with the daw and you gaing experience slowly

Ответить
Clean Bold
Clean Bold - 19.08.2022 12:29

I liked logic behind Theme mode ❤️ very very informative videos. Thanks for this excellent tutorial.😇

Ответить
유현식
유현식 - 10.08.2022 20:41

What flutter version did you use in this video?

Ответить
Ꮅ Ꭿ Ꮑ Ꮄ Ꭿ 🐼 ᗪᙓᐯ
Ꮅ Ꭿ Ꮑ Ꮄ Ꭿ 🐼 ᗪᙓᐯ - 02.08.2022 12:56

Hi I have A Err The Dark Theme And Light Theme Not Working In Android And The Sound Of Notifaction Is nOte Working

Ответить
Ꮅ Ꭿ Ꮑ Ꮄ Ꭿ 🐼 ᗪᙓᐯ
Ꮅ Ꭿ Ꮑ Ꮄ Ꭿ 🐼 ᗪᙓᐯ - 02.08.2022 12:54

hi I Have Err The Dark theme And Light Theme Is not working And in Android the sound of notification is not working

Ответить
The Unicorn Shop
The Unicorn Shop - 19.07.2022 21:27

How can I put an edit button when u click on task and redirect it to add task page

Ответить
Amjad khan
Amjad khan - 19.07.2022 10:45

tz.initializeTimeZones();
Error:The function 'initializeTimeZones' isn't defined
plzz help

Ответить
Remon Raafat William
Remon Raafat William - 19.07.2022 01:57

Hello Sir
First, I would love to thank you so much for all the information you gave us, it was great to learn so many things from you and I fallowing your steps even I learn from my mistakes and try to solve the errors.

Second, I have an error in this line :
notifyHelper.displayNotification(
Title: "Theme Changed",
body: Get.isDarkMode?"Activated Light Theme" : "Activated Dark Theme"
);
notifyHelper.scheduledNotification();

it asking me to put notifyHelper in local Var, even after I already done in in this line :

class _HomePageState extends State<HomePage> {
var notifyHelper;
@override
void initState() {
// TODO: implement initState
super.initState();
notifyHelper=NotifyHelper();
notifyHelper.initializeNotification();
notifyHelper.requestIOSPermissions();
}

Ответить
Разработка мобильных приложений
Разработка мобильных приложений - 12.07.2022 20:37

It is great!

Ответить
Angel Suresh Karki
Angel Suresh Karki - 12.07.2022 13:46

I think they have changed the fact that primaryColor changes the appBar Color sir!!Its not working.

Ответить
Antonio Albert
Antonio Albert - 20.06.2022 22:01

when im input the notifyHelper in _appBar the android studio give me error that say undefined name'notifyHelper'..... anyone have a solution ?

Ответить
Antonio Albert
Antonio Albert - 19.06.2022 10:23

why if i change the brightness to dark the appbar change into dark color too ??? anyone can explain to me??

Ответить
Mehmet Uzel
Mehmet Uzel - 30.05.2022 16:26

Me again, so apparently flutter changed approach with new update you wont see primarySwath (new version of primary color) when you use brightness.dark keep in mind.

Ответить
Mehmet Uzel
Mehmet Uzel - 30.05.2022 16:15

Hey guys primary color changed to primarySwatch if you dont see effect of changing color

Ответить