diff --git a/lib/assets/icons/clarity_tools-line.svg b/lib/assets/icons/clarity_tools-line.svg
new file mode 100644
index 0000000..948e32b
--- /dev/null
+++ b/lib/assets/icons/clarity_tools-line.svg
@@ -0,0 +1,11 @@
+
diff --git a/lib/assets/icons/create image.svg b/lib/assets/icons/create image.svg
new file mode 100644
index 0000000..8cb46cb
--- /dev/null
+++ b/lib/assets/icons/create image.svg
@@ -0,0 +1,6 @@
+
diff --git a/lib/assets/icons/global-search 2.svg b/lib/assets/icons/global-search 2.svg
new file mode 100644
index 0000000..52218bd
--- /dev/null
+++ b/lib/assets/icons/global-search 2.svg
@@ -0,0 +1,9 @@
+
diff --git a/lib/assets/icons/message-question.svg b/lib/assets/icons/message-question.svg
new file mode 100644
index 0000000..56d84db
--- /dev/null
+++ b/lib/assets/icons/message-question.svg
@@ -0,0 +1,5 @@
+
diff --git a/lib/assets/icons/microphone-3.svg b/lib/assets/icons/microphone-3.svg
new file mode 100644
index 0000000..a696032
--- /dev/null
+++ b/lib/assets/icons/microphone-3.svg
@@ -0,0 +1,8 @@
+
diff --git a/lib/assets/icons/send3.svg b/lib/assets/icons/send3.svg
new file mode 100644
index 0000000..eb076e5
--- /dev/null
+++ b/lib/assets/icons/send3.svg
@@ -0,0 +1,3 @@
+
diff --git a/lib/assets/icons/summary.svg b/lib/assets/icons/summary.svg
new file mode 100644
index 0000000..d42013a
--- /dev/null
+++ b/lib/assets/icons/summary.svg
@@ -0,0 +1,5 @@
+
diff --git a/lib/assets/icons/translate.svg b/lib/assets/icons/translate.svg
new file mode 100644
index 0000000..6867825
--- /dev/null
+++ b/lib/assets/icons/translate.svg
@@ -0,0 +1,7 @@
+
diff --git a/lib/main.dart b/lib/main.dart
index 3713923..c8eeca9 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -50,7 +50,7 @@ Future _backgroundCallbackHomeWidget(Uri? uri) async {
void main() async {
runZonedGuarded(
- () async {
+ () async {
WidgetsFlutterBinding.ensureInitialized();
try {
if (!kIsWeb) {
@@ -73,7 +73,7 @@ void main() async {
}
await SentryFlutter.init(
- (options) {
+ (options) {
options.dsn = 'https://a4cfcaa7d67471240d295c25c968d91d@o4508585857384448.ingest.de.sentry.io/4508585886548048';
options.tracesSampleRate = 1.0;
options.profilesSampleRate = 1.0;
@@ -81,7 +81,7 @@ void main() async {
appRunner: () => runApp(const Didvan()),
);
},
- (error, stack) {
+ (error, stack) {
Sentry.captureException(error, stackTrace: stack);
},
);
@@ -178,7 +178,10 @@ class _DidvanState extends State with WidgetsBindingObserver {
providers: [
ChangeNotifierProvider(create: (context) => PodcastsState()),
ChangeNotifierProvider(create: (context) => MediaProvider()),
+ // --- MODIFIED ---
+ // حذف ..fetchWelcomeMessage()
ChangeNotifierProvider(create: (context) => UserProvider()),
+ // --- END MODIFIED ---
ChangeNotifierProvider(create: (context) => ThemeProvider()),
ChangeNotifierProvider(create: (context) => StudioDetailsState()),
ChangeNotifierProvider(create: (context) => HistoryAiChatState()),
@@ -190,42 +193,43 @@ class _DidvanState extends State with WidgetsBindingObserver {
builder: (context, themeProvider, child) => Container(
color: Theme.of(context).colorScheme.surface,
child: SafeArea(
- child: MaterialApp(
- scrollBehavior: MyCustomScrollBehavior(),
- navigatorKey: navigatorKey,
- debugShowCheckedModeBanner: false,
- title: 'Didvan',
- theme: LightThemeConfig.themeData.copyWith(
- bottomSheetTheme: const BottomSheetThemeData(
- surfaceTintColor: Colors.transparent,
- backgroundColor: Colors.transparent),
- textTheme: LightThemeConfig.themeData.textTheme.apply(
- fontFamily: themeProvider.fontFamily,
- )),
- darkTheme: DarkThemeConfig.themeData.copyWith(
- bottomSheetTheme: const BottomSheetThemeData(
- surfaceTintColor: Colors.transparent,
- backgroundColor: Colors.transparent),
- textTheme: DarkThemeConfig.themeData.textTheme.apply(
- fontFamily: themeProvider.fontFamily,
- )),
- color: LightThemeConfig.themeData.primaryColor,
- themeMode: themeProvider.themeMode,
- onGenerateRoute: (settings) =>
- RouteGenerator.generateRoute(settings),
- builder: BotToastInit(),
- navigatorObservers: [BotToastNavigatorObserver()],
- initialRoute: "/",
- localizationsDelegates: const [
- GlobalCupertinoLocalizations.delegate,
- GlobalMaterialLocalizations.delegate,
- GlobalWidgetsLocalizations.delegate,
- ],
- supportedLocales: const [
- Locale("fa", "IR"),
- ],
- locale: const Locale("fa", "IR"),
- )),
+ child: MaterialApp(
+ scrollBehavior: MyCustomScrollBehavior(),
+ navigatorKey: navigatorKey,
+ debugShowCheckedModeBanner: false,
+ title: 'Didvan',
+ theme: LightThemeConfig.themeData.copyWith(
+ bottomSheetTheme: const BottomSheetThemeData(
+ surfaceTintColor: Colors.transparent,
+ backgroundColor: Colors.transparent),
+ textTheme: LightThemeConfig.themeData.textTheme.apply(
+ fontFamily: themeProvider.fontFamily,
+ )),
+ darkTheme: DarkThemeConfig.themeData.copyWith(
+ bottomSheetTheme: const BottomSheetThemeData(
+ surfaceTintColor: Colors.transparent,
+ backgroundColor: Colors.transparent),
+ textTheme: DarkThemeConfig.themeData.textTheme.apply(
+ fontFamily: themeProvider.fontFamily,
+ )),
+ color: LightThemeConfig.themeData.primaryColor,
+ themeMode: themeProvider.themeMode,
+ onGenerateRoute: (settings) =>
+ RouteGenerator.generateRoute(settings),
+ builder: BotToastInit(),
+ navigatorObservers: [BotToastNavigatorObserver()],
+ initialRoute: "/",
+ localizationsDelegates: const [
+ GlobalCupertinoLocalizations.delegate,
+ GlobalMaterialLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ ],
+ supportedLocales: const [
+ Locale("fa", "IR"),
+ ],
+ locale: const Locale("fa", "IR"),
+ ),
+ ),
),
),
);
diff --git a/lib/models/ai/ai_model_enum.dart b/lib/models/ai/ai_model_enum.dart
new file mode 100644
index 0000000..1155a39
--- /dev/null
+++ b/lib/models/ai/ai_model_enum.dart
@@ -0,0 +1,7 @@
+// lib/models/ai/ai_model_enum.dart
+
+enum AiModel {
+ chatGPT,
+ gemini,
+ grok
+}
diff --git a/lib/providers/user.dart b/lib/providers/user.dart
index 464412a..3e476d8 100644
--- a/lib/providers/user.dart
+++ b/lib/providers/user.dart
@@ -16,6 +16,14 @@ class UserProvider extends CoreProvier {
bool isAuthenticated = false;
int _unreadMessageCount = 0;
+ // --- ADDED ---
+ String? _welcomeMessage;
+ bool _isLoadingWelcome = true;
+
+ String? get welcomeMessage => _welcomeMessage;
+ bool get isLoadingWelcome => _isLoadingWelcome;
+ // --- END ADDED ---
+
set unreadMessageCount(int value) {
if (value < 0) {
return;
@@ -32,6 +40,55 @@ class UserProvider extends CoreProvier {
static final List _statisticMarkQueue = [];
static final List