mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
added env / removed token
This commit is contained in:
1 parent
e614ed2353
commit
9c5af860d6
7 files changed
+28
-13
No files matched your search
+4
-1
@@ -52,4 +52,7 @@ android/*.keystore
|
||||
android/key.properties
|
||||
|
||||
/settings_tiles_custom/
|
||||
|
||||
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
+2
-1
@@ -22,4 +22,5 @@ build/
|
||||
.packages
|
||||
pubspec.lock
|
||||
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
+2
-1
@@ -19,6 +19,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:material_color_utilities/material_color_utilities.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../services/data_backup_service.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
final CorePalette paletteStartScreen = CorePalette.of(const Color.fromARGB(255, 255, 196, 0).toARGB32());
|
||||
|
||||
@@ -76,7 +77,7 @@ void main() async {
|
||||
|
||||
|
||||
await PreferencesHelper.init();
|
||||
|
||||
await dotenv.load(fileName: ".env");
|
||||
|
||||
final dir = await getApplicationDocumentsDirectory();
|
||||
Hive.init(dir.path);
|
||||
|
||||
@@ -1231,13 +1231,13 @@ Widget buildLayoutBlock(LayoutBlockType type) {
|
||||
onPressed: () => handleSaveLocationView(
|
||||
context: context,
|
||||
updateUIState: () {
|
||||
// setState(() {
|
||||
// isViewLocation = false;
|
||||
// _isAppFullyLoaded = false;
|
||||
// _istriggeredFromLocations = true;
|
||||
// themeCalled = false;
|
||||
// _isLoadingFroggy = true;
|
||||
// });
|
||||
setState(() {
|
||||
isViewLocation = false;
|
||||
_isAppFullyLoaded = false;
|
||||
_istriggeredFromLocations = true;
|
||||
themeCalled = false;
|
||||
_isLoadingFroggy = true;
|
||||
});
|
||||
},
|
||||
),
|
||||
style: ButtonStyle(backgroundColor: WidgetStateProperty.all(Theme.of(context).colorScheme.tertiary)),
|
||||
|
||||
@@ -5,7 +5,7 @@ import '../utils/open_links.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
class LanguagesScreen extends StatefulWidget {
|
||||
const LanguagesScreen({super.key});
|
||||
|
||||
@@ -84,7 +84,7 @@ class _LanguagesScreenState extends State<LanguagesScreen> {
|
||||
FutureBuilder<Map<String, int>>(
|
||||
future: TranslationProgressService(
|
||||
projectId: '741419',
|
||||
apiToken: '22439bfa72878c3ecb9a1b17ea8d2f9379f800b616856c4647219af7da462632fb325abd32815ace',
|
||||
apiToken: dotenv.env['API_TOKEN']!.toString(),
|
||||
).fetchTranslationProgress(),
|
||||
builder: (context, snapshot) {
|
||||
final progressMap = snapshot.data ?? {};
|
||||
@@ -509,6 +509,7 @@ String getLanguageCodeCrodwin(Locale locale) {
|
||||
'tr', // Turkish
|
||||
'uk', // Ukrainian
|
||||
'vi', // Vietnamese
|
||||
'ca'
|
||||
].contains(lang)) {
|
||||
return lang;
|
||||
}
|
||||
|
||||
@@ -238,6 +238,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.1"
|
||||
flutter_dotenv:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_dotenv
|
||||
sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.1"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
||||
+2
-1
@@ -62,7 +62,8 @@ dependencies:
|
||||
geocoding: ^4.0.0
|
||||
solar_calculator: ^1.0.3
|
||||
file_picker: ^10.2.0
|
||||
|
||||
flutter_dotenv: ^5.2.1
|
||||
|
||||
settings_tiles:
|
||||
path: ./settings_tiles_custom
|
||||
|
||||
|
||||
Reference in new issue
Block a user