diff --git a/assets/logo.png b/assets/logo.png index 698ade3..31b63ec 100644 Binary files a/assets/logo.png and b/assets/logo.png differ diff --git a/lib/home_page.dart b/lib/home_page.dart index d4cda42..70e768a 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -3,6 +3,7 @@ import 'package:bhagwat_gita_app/contact_us.dart'; import 'package:bhagwat_gita_app/councellers.dart'; import 'package:bhagwat_gita_app/pdf.dart'; import 'package:flutter/material.dart'; +// import 'package:alan_voice/alan_voice.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:youtube_player_flutter/youtube_player_flutter.dart'; import 'package:webview_flutter/webview_flutter.dart'; @@ -60,6 +61,17 @@ class _HomePageState extends State { int _selectedIndex = 0; + // _HomePageState() { + // /// Init Alan Button with project key from Alan AI Studio + // AlanVoice.addButton( + // "aa52753a16404b7fcf69d3be5eed61172e956eca572e1d8b807a3e2338fdd0dc/stage"); + + // /// Handle commands from Alan AI Studio + // AlanVoice.onCommand.add((command) { + // debugPrint("got new command ${command.toString()}"); + // }); + // } + @override Widget build(BuildContext context) { return Scaffold( @@ -72,6 +84,13 @@ class _HomePageState extends State { color: Colors.deepPurple, ), ), + // actions: [ + // IconButton( + // icon: const Icon(Icons.mic), + // onPressed: () { + // }, + // ), + // ], ), body: SafeArea( child: Padding( diff --git a/lib/main.dart b/lib/main.dart index c68ca3d..6b08f13 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,14 @@ -// import 'package:bhagwat_gita_app/home_page.dart'; -import 'package:bhagwat_gita_app/home_page.dart'; -// import 'package:bhagwat_gita_app/sign_and_login.dart';s import 'package:flutter/material.dart'; +import 'package:animated_splash_screen/animated_splash_screen.dart'; +import 'package:palette_generator/palette_generator.dart'; +import 'package:bhagwat_gita_app/home_page.dart'; +// import 'package:alan_voice/alan_voice.dart'; void main() { + // AlanVoice.addButton( + // "aa52753a16404b7fcf69d3be5eed61172e956eca572e1d8b807a3e2338fdd0dc/stage", + // buttonAlign: AlanVoice.BUTTON_ALIGN_LEFT, + // ); runApp(const MyApp()); } @@ -19,7 +24,34 @@ class MyApp extends StatelessWidget { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: const HomePage(), + home: FutureBuilder( + future: _generatePalette(context), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const CircularProgressIndicator(); + } else if (snapshot.hasError || snapshot.data == null) { + return const Text('Error loading palette'); + } else { + final dominantColor = snapshot.data!.dominantColor?.color; + + return AnimatedSplashScreen( + splash: Image.asset('assets/logo.png', + width: 800.0, // Adjust the width as needed + height: 800.0, // Adjust the height as needed + fit: BoxFit.contain), // Optional, adjust the fit as needed + nextScreen: const HomePage(), + splashTransition: SplashTransition.rotationTransition, + backgroundColor: dominantColor ?? Colors.deepPurple, + ); + } + }, + ), + ); + } + + Future _generatePalette(BuildContext context) async { + return await PaletteGenerator.fromImageProvider( + AssetImage('assets/logo.png'), ); } } diff --git a/lib/pdf.dart b/lib/pdf.dart index e502f23..38fc7c7 100644 --- a/lib/pdf.dart +++ b/lib/pdf.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; -import 'package:share/share.dart'; -import 'dart:io'; +// import 'package:share/share.dart'; +// import 'dart:io'; class YourPDFScreen extends StatelessWidget { @override @@ -37,11 +37,4 @@ class PDFViewer extends StatelessWidget { ), ); } - - // void _sharePDF(BuildContext context, String pdfPath) { - // final RenderBox box = context.findRenderObject() as RenderBox; - // Share.shareFiles([pdfPath], - // text: 'Check out this PDF!', - // sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size); - // } } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index e7595b0..669b803 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,6 +7,7 @@ import Foundation import audioplayers_darwin import device_info_plus +import package_info import package_info_plus import path_provider_foundation import shared_preferences_foundation @@ -20,6 +21,7 @@ import zego_zim func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/pubspec.lock b/pubspec.lock index e6bc28a..c23b907 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + alan_voice: + dependency: "direct main" + description: + name: alan_voice + sha256: df776b4e6408c2cfafb51add7db92381bb8bfd3999172a826455db21bd83e9da + url: "https://pub.dev" + source: hosted + version: "4.4.0" + animated_splash_screen: + dependency: "direct main" + description: + name: animated_splash_screen + sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124 + url: "https://pub.dev" + source: hosted + version: "1.3.0" archive: dependency: transitive description: @@ -448,6 +464,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + package_info: + dependency: transitive + description: + name: package_info + sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + url: "https://pub.dev" + source: hosted + version: "2.0.2" package_info_plus: dependency: transitive description: @@ -464,6 +488,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + page_transition: + dependency: "direct main" + description: + name: page_transition + sha256: dee976b1f23de9bbef5cd512fe567e9f6278caee11f5eaca9a2115c19dc49ef6 + url: "https://pub.dev" + source: hosted + version: "2.1.0" + palette_generator: + dependency: "direct main" + description: + name: palette_generator + sha256: eb7082b4b97487ebc65b3ad3f6f0b7489b96e76840381ed0e06a46fe7ffd4068 + url: "https://pub.dev" + source: hosted + version: "0.3.3+3" path: dependency: "direct main" description: @@ -689,18 +729,18 @@ packages: dependency: "direct main" description: name: sqflite - sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" + sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6 + sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" url: "https://pub.dev" source: hosted - version: "2.5.0+2" + version: "2.5.3" stack_trace: dependency: transitive description: @@ -841,10 +881,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96 + sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c url: "https://pub.dev" source: hosted - version: "6.2.3" + version: "6.2.4" url_launcher_android: dependency: transitive description: @@ -1065,10 +1105,10 @@ packages: dependency: transitive description: name: zego_uikit - sha256: "5ff993a82c1eab398f3e10f9fbe8bd64cdd216c60eda1cd40afb0f7ec8e8f339" + sha256: "1e1e4ab7429f37fb9b2b9a2e90b08f789aa81902d01796d9df70af6a213e157e" url: "https://pub.dev" source: hosted - version: "2.18.0" + version: "2.18.2" zego_uikit_prebuilt_call: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index a4b0a8c..05747d7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,9 +28,6 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - # chat_gpt_sdk: - # git: - # url: https://github.com/iampawan/Flutter-ChatGPT.git carousel_slider: ^4.2.1 youtube_player_flutter: ^8.1.2 webview_flutter: ^2.0.14 @@ -44,6 +41,10 @@ dependencies: syncfusion_flutter_pdfviewer: ^24.1.47 flutter_launcher_icons: ^0.13.1 share: ^2.0.4 + animated_splash_screen: ^1.3.0 + page_transition: ^2.1.0 + palette_generator: ^0.3.3+3 + alan_voice: 4.4.0 # twilio_dart_api: ^0.13.5 @@ -79,6 +80,7 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/Bhagavad_Gita.pdf + - assets/logo.png # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see