Skip to content

Commit

Permalink
Remove dotenv package and .env requirements (thunder-app#946)
Browse files Browse the repository at this point in the history
* add empty .env file, but keep it in the gitignore

* remove .env from gitignore

* remove flutter_dotenv

---------

Co-authored-by: Garrett Bischof <[email protected]>
  • Loading branch information
gwbischof and Garrett Bischof authored Dec 5, 2023
1 parent 8407e60 commit a7c3578
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 20 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Environment files
.env
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<hr />
<p>
Hey there! Just wanted to let you know that this repo is currently my personal side project to build something cool while learning about Dart and Flutter.
Hey there! Just wanted to let you know that this repo is currently my personal side project to build something cool while learning about Dart and Flutter.
</p>
<p>
Contributions to this project are always welcomed, and in fact, even strongly encouraged here! Since I am only able to work on this during my spare time, any contributions from the community is valuable. If you are a developer, feel free to tackle any issues present.
Expand Down Expand Up @@ -145,9 +145,8 @@ Thunder is developed with Flutter, and is built to support both iOS and Android.
To build the app from source, a few steps are required.

1. Set up and install Flutter. For more information, visit https://docs.flutter.dev/get-started/install.
2. Ensure that you are on Flutter's `beta` channel using `flutter channel beta`.
2. Ensure that you are on Flutter's `beta` channel using `flutter channel beta`.
2. Clone this repository and fetch the dependencies using `flutter pub get`
3. Generate an empty `.env` file. The `.env` file holds any credentials. At the time of writing, en empty `.env` file with a comment is all that is required.
4. Run `flutter gen-l10n` to generate the localization files.
5. Optional: Run the build script using `dart scripts/build.dart`, which will build both the iOS and Android release versions. This step is only required if you want to build a release version of the app.

Expand Down
4 changes: 0 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:flutter/services.dart';

// External Packages
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:l10n_esperanto/l10n_esperanto.dart';
import 'package:overlay_support/overlay_support.dart';
Expand Down Expand Up @@ -38,9 +37,6 @@ void main() async {
//Setting SystemUIMode
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);

// Load up environment variables
await dotenv.load(fileName: ".env");

// Load up sqlite database
await DB.instance.database;

Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0-beta+1"
flutter_dotenv:
dependency: "direct main"
description:
name: flutter_dotenv
sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77"
url: "https://pub.dev"
source: hosted
version: "5.1.0"
flutter_file_dialog:
dependency: "direct main"
description:
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dependencies:
bloc: ^8.1.2
flutter_bloc: ^8.1.3
equatable: ^2.0.5
flutter_dotenv: ^5.1.0
cached_network_image: ^3.2.3
url_launcher: ^6.1.11
flutter_markdown: ^0.6.15
Expand Down Expand Up @@ -129,7 +128,6 @@ flutter:

# To add assets to your application, add an assets section, like this:
assets:
- .env
- assets/logo.png
- assets/logo_background.png

Expand Down

0 comments on commit a7c3578

Please sign in to comment.