I'm learning Dart since I soon want to use Futter for different personal projects, but now that I've gone through this interesting video, I'd like to develop small projects directly using the language and libraries that are in puv.deb.
So far I have only found this exercise which I found very interesting, but all the other projects I find always directly use Flutter. I have also already managed to do the Codelab and other exercises on the Dart website.
What types of projects could you migrate from other languages to try to implement in Dart?
I would appreciate links to websites or videos where they develop projects in Dart
Related
Why Flutter team decided to use Dart as main language?
Dart is compiled to JavaScript so why not using JavaScript as the programming language of Flutter? I mean the idea of: "it compiles to native" does not stand as there are other JavaScript framework to use or compile (?) to native code (like https://nativescript.org/)
[Edit]
A related question might be : Flutter - How does it work behind the scenes?
Your premise is wrong. Dart is not compiled to JS.
It is only compiled to JS when you target the web, one of many possible targets and not the first one. As always with JS, it's not done because JS is a good language to work with, it's because it's the only thing that will reliably (cough) work in browsers.
You can read a more in depth explanation in the documentation
dart language has lot of feature that doesn't exist in javascript
and google create dart to replace js in web so they decide to push further dart language more and they succed with it.dart language more power than js
It's probably not a programming question and a bit too generic but I can't find any resource about the differences of writing plugin for flutter using Kotlin vs Java. From my research, almost every plugin in pub.dev that I found is written in Java. I don't say Java is bad but I personally prefer Kotlin over Java because of the syntax.
I'm planning to build native code to interact with native libs both on iOS and Android for my project since I couldn't find any plugin that satisfy the project requirements. I'd like to share it on pubdev when it's done (hopefully) so I have to think twice before writing it.
The question is, if I do so (developing Kotlin-based plugin), will it make any difference? Like maybe requires the user to add some extra configuration to their project? Or maybe any Flutter project that uses Java can't use my package? and.. will it do the same for iOS (using Swift over Objective-C)? The docs is telling us that we can switch both in between, but doesn't tell any side effects about it.
No there is nothing to worry about. Flutter apps are now by default created with Kotlin/Swift and not with Java/ObjC. Of course if someone has an ultra old Flutter configuration, then he might have some problems but I wouldn't concern myself with it.
All the native plugin code is converted to a Gradle dependency or Pod(spec) dependency. The app developer doesn't have to care about it and that is a good thing.
I'm working with Parse Server, my task is to build a flutter application that using Parse SDK to communicate with the Parse Server. You can see the Parse SDK here, these are two packages, one is for Flutter, and another is for Dart. I don't know the difference between these two, and which one I should use.
If you create a Flutter app you should use Parse-SDK-Flutter package. In Migration Guide plugin developers provide this reason for moving from Dart to separate package:
This was done in order to provide a dart package for the parse-server, while keeping maintenance simple. You can find both packages in the package directory..
With Flutter now supporting web and mobile app development, what's the best practice to avoid rewriting code all the time? Say you have a few classes / functions living in your mobile app project that'd you'd like to reuse for your web project, is importing these files the way to go? If so, can you do that across multiple projects?
Here is the approach I found: using packages.
You can create a package with the following terminal command:
flutter create --template=package myPackageName
then simply create whatever class, function, etc. you want to share across your projects in the package and import them in your other Flutter projects.
Here is an example: https://youtu.be/MJO695IE-EA
I have started learning flutter after 5 years of android dev. And right now i am trying to implement multi modular clean architecture as i used to, when developing android, example of such architecture: https://github.com/android10/Android-CleanArchitecture
And i have ran into two issues i can't solve by on my own.
1) What type of flutter module should i use module/plugin/package? I want to make domian layer as simple as it could be(list of interfaces,mappers and dto's), in android it was written in plain kotlin without any android sdk's usage. It seems like domain layer should be package(because it doesn't have any platform specific code and seems to be the simplest module possible) and data layer should be plugin in case i would be forced to make some platform specific code here, but i am not sure. It would be great to have some suggestions here.
2) Maybe there is a github repo example, as I have shown above? All git repos i have found so far are implementing clean architecture with just folders and this approach always ends up with dependencies mess, loosing all the profit you can get from clean architecture.
Any help is appreciated!
You could pay attention to the library clean_architecture (https://pub.dev/packages/clean_architecture).
It may be possible to implement a clean architecture not by all the rules, but it brings a certain useful result.
In the near future I will add instructions on how to use it