linux app config
This commit is contained in:
@@ -29,10 +29,11 @@ class DefaultFirebaseOptions {
|
||||
case TargetPlatform.windows:
|
||||
return windows;
|
||||
case TargetPlatform.linux:
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions have not been configured for linux - '
|
||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||
);
|
||||
return web;
|
||||
// throw UnsupportedError(
|
||||
// 'DefaultFirebaseOptions have not been configured for linux - '
|
||||
// 'you can reconfigure this by running the FlutterFire CLI again.',
|
||||
// );
|
||||
default:
|
||||
throw UnsupportedError(
|
||||
'DefaultFirebaseOptions are not supported for this platform.',
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -92,7 +94,7 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (!kIsWeb) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
_initializeQuickActions();
|
||||
}
|
||||
theme = MihTheme();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
@@ -6,7 +7,6 @@ import 'package:flutter_web_plugins/url_strategy.dart'
|
||||
if (dart.library.html) 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import 'package:mzansi_innovation_hub/firebase_options.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_go_router.dart';
|
||||
import 'package:pwa_install/pwa_install.dart';
|
||||
@@ -21,10 +21,13 @@ void main() async {
|
||||
apiDomain: AppEnviroment.baseApiUrl,
|
||||
apiBasePath: "/auth",
|
||||
);
|
||||
await Firebase.initializeApp(
|
||||
options: DefaultFirebaseOptions.currentPlatform,
|
||||
);
|
||||
if (!kIsWeb) {
|
||||
// await Firebase.initializeApp(
|
||||
// // options: DefaultFirebaseOptions.currentPlatform,
|
||||
// options: (Platform.isLinux)
|
||||
// ? DefaultFirebaseOptions.web // Forces Linux to use the Web config
|
||||
// : DefaultFirebaseOptions.currentPlatform,
|
||||
// );
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
const List<String> testDeviceIds = ['733d4c68-9b54-453a-9622-2df407310f40'];
|
||||
MobileAds.instance.updateRequestConfiguration(
|
||||
RequestConfiguration(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
@@ -6,7 +7,6 @@ import 'package:flutter_web_plugins/url_strategy.dart'
|
||||
if (dart.library.html) 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import 'package:mzansi_innovation_hub/firebase_options.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_go_router.dart';
|
||||
import 'package:pwa_install/pwa_install.dart';
|
||||
@@ -21,10 +21,10 @@ void main() async {
|
||||
apiDomain: AppEnviroment.baseApiUrl,
|
||||
apiBasePath: "/auth",
|
||||
);
|
||||
await Firebase.initializeApp(
|
||||
options: DefaultFirebaseOptions.currentPlatform,
|
||||
);
|
||||
if (!kIsWeb) {
|
||||
// await Firebase.initializeApp(
|
||||
// options: DefaultFirebaseOptions.currentPlatform,
|
||||
// );
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
MobileAds.instance.initialize();
|
||||
} else {
|
||||
usePathUrlStrategy();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -128,7 +130,10 @@ class _MihSearchBarState extends State<MihSearchBar> {
|
||||
controller: widget.controller, // Assign the controller
|
||||
focusNode: widget.searchFocusNode,
|
||||
autocorrect: true,
|
||||
spellCheckConfiguration: kIsWeb ? null : SpellCheckConfiguration(),
|
||||
spellCheckConfiguration:
|
||||
!kIsWeb && (Platform.isAndroid || Platform.isIOS)
|
||||
? SpellCheckConfiguration()
|
||||
: null,
|
||||
onSubmitted: (value) {
|
||||
widget.onPrefixIconTap
|
||||
?.call(); // Call the prefix icon tap handler
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -157,11 +159,15 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
||||
cursorColor: widget.inputColor,
|
||||
autofillHints: widget.autofillHints,
|
||||
autocorrect: true,
|
||||
spellCheckConfiguration: (kIsWeb ||
|
||||
widget.passwordMode == true ||
|
||||
widget.numberMode == true)
|
||||
? null
|
||||
: SpellCheckConfiguration(),
|
||||
// spellCheckConfiguration: (kIsWeb ||
|
||||
// widget.passwordMode == true ||
|
||||
// widget.numberMode == true)
|
||||
// ? null
|
||||
// : SpellCheckConfiguration(),
|
||||
spellCheckConfiguration: !kIsWeb &&
|
||||
(Platform.isAndroid || Platform.isIOS)
|
||||
? SpellCheckConfiguration()
|
||||
: null,
|
||||
textAlign:
|
||||
widget.textIputAlignment ?? TextAlign.start,
|
||||
textAlignVertical: widget.multiLineInput == true
|
||||
|
||||
Reference in New Issue
Block a user