Skip to content

Commit

Permalink
Remove dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sakusaku3939 committed Jan 24, 2024
1 parent 5f8993a commit fb6bb6e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
env

# Miscellaneous
*.class
*.log
Expand Down
2 changes: 0 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:localization/constant/color_palette.dart';
import 'package:localization/constant/global_context.dart';
Expand All @@ -13,7 +12,6 @@ Future<void> main() async {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await dotenv.load(fileName: 'env');
runApp(
const ProviderScope(
child: MyApp(),
Expand Down
7 changes: 4 additions & 3 deletions lib/model/image_uploader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:http/http.dart' as http;
import 'package:image_picker/image_picker.dart';
import 'package:localization/constant/global_context.dart';
Expand All @@ -19,9 +18,11 @@ class ImageUploader {
showLoader();
final request = http.MultipartRequest(
'POST',
Uri.parse(dotenv.env['UPLOAD_URI']!),
Uri.parse("http://chasca-ex.jn.sfc.keio.ac.jp:5000/upload"),
);
request.headers.addAll({"AccessToken": dotenv.env['ACCESS_TOKEN']!});
request.headers.addAll({
"AccessToken": "62BA9128-BC63-4865-9F92-B332BB4D682C",
});
request.files.add(
http.MultipartFile.fromBytes(
'file',
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_dotenv:
dependency: "direct main"
description:
name: flutter_dotenv
sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77"
url: "https://pub.dev"
source: hosted
version: "5.1.0"
flutter_hooks:
dependency: "direct main"
description:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ dependencies:
external_path: ^1.0.3
flutter_launcher_icons: ^0.13.1
geolocator: ^10.0.1
flutter_dotenv: ^5.1.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit fb6bb6e

Please sign in to comment.