Skip to content

Commit

Permalink
upd code for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Wei committed Mar 6, 2021
1 parent 32fdcae commit 5ce87bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';

import './constants.dart';
import './my_main_app.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
if (kIsOnMobile) {
await Firebase.initializeApp();
}
final sharedPref = await SharedPreferences.getInstance();
runApp(MyMainApp(sharedPref));
}
1 change: 1 addition & 0 deletions linux/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ add_custom_command(
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
linux-x64 ${CMAKE_BUILD_TYPE}
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
Expand Down

0 comments on commit 5ce87bd

Please sign in to comment.