r/FlutterDev • u/EngineerScientist • Jun 13 '19
Example A GitHub template for Flutter to share all business logic between web, mobile and desktop in one repo. The goal of this repo is to have everything you need to start with flutter desktop + mobile simply by forking the project.
https://github.com/AppleEducate/flutter_everywhere4
3
u/maylortaylor Jun 13 '19
Cant wait to try this out. Super stoked Flutter is actually doing what they promised they would do.
2
u/miyoyo Jun 13 '19
Why are all of these files named index.dart?
1
u/SoundDr Jun 13 '19
Itβs my project. And in VSCode you can add them automatically for a directory. It is very useful for when you have lots of nested folders and just want to import one import that contains all your models or screens.
3
u/filleduchaos Jun 13 '19
I think the question here is about nomenclature - makes more sense for e.g. JS than for Dart
1
u/SoundDr Jun 13 '19
I donβt use JS I have only used this because of my enterprise flutter apps. I really helps in huge apps
5
u/filleduchaos Jun 13 '19
What I meant was, most JS implementations will e.g. let you
import './foo/index.js'as justimport ./foo', which has vague roots in the history/connotations ofindexon the web. Dart doesn't give any special recognition to afoo/index.dartfile, so it doesn't make as much sense as a name - in fact, most libraries you see would rather name that file asfoo/foo.dart.1
u/SoundDr Jun 14 '19
Ohhhh gotcha. Yeah I just was using a VSCode extension
1
3
u/EngineerScientist Jun 13 '19
Source : https://twitter.com/rodydavis/status/1139167994200973313