- Create example plugin project
flutter create --org com.example --platforms=linux myapp
- From
myapp/example
runflutter run
and quit the app - Install vscode
- Install flutter plugin
- Install MS C++ plugin https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
- Switch to Insider channel for new features
- When opening project VS code should ask you if you want to configure CMake project - answerr YES and click Locate cmake file
now this is important choose -
myapp/example/linux/CMakeLists.txt
NOT the one frommyapp/linux
- You will probably have to relaunch vscode
- inside
myapp/
folder create.vscode
(notice the dot) folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.0.0) | |
project(projectname VERSION 0.1.0) | |
include(CTest) | |
enable_testing() | |
find_package(OpenGL REQUIRED) | |
find_package(PkgConfig REQUIRED) | |
pkg_search_module(GLFW REQUIRED glfw3) | |
find_package(GLEW REQUIRED) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.dartlang.org/guides/language/analysis-options | |
include: package:pedantic/analysis_options.yaml | |
analyzer: | |
strong-mode: | |
implicit-dynamic: false | |
errors: | |
# treat missing required parameters as a warning (not a hint) | |
missing_required_param: warning | |
# treat missing returns as a warning (not a hint) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License | |
* | |
* Copyright (c) 2016 Andreas Ahlenstorf | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |