1629197716
Dartlin is heavily inspired by Kotlin, therefore Dartlin tries to bring the ease of data manipulation and clean code from Kotlin to Dart.
Dartlin is a helper library that provides the following concepts:
Dartlin is not a performance library, the methods it provides exist to help the developer, and to keep their code clean and readable. Readability does not equal performance optimization, so if you are looking to optimize your code, this is not the library for you.
Note: Dartlin tries to keep the performance of the provided methods as good as possible but they are not being benchmarked in any way. Most of the methods rely on closures to work.
Dartlin provides different libraries that you can import:
Or you can use the common library:
import 'package:dartlin/dartlin.dart';
The Dartlin control_flow library provides methods for writing cleaner and more controllable code, these control flow methods can be used as a replacement for existing control flow statements or in combination with them.
Note: Dart already provides a few interesting control flow operations for Lists and Maps. So before you decide to use Dartlin, first read more about collection operators. It may already suit your needs.
The iff method works like the if statement, but with the added bonus of being able to write them as expressions. You can use them to replace complex ternary operators with a readable if-like statement:
final x = iff(a < b, () {
return a;
}).elseIf(a == b, () {
return 0;
}).orElse(() {
return b;
});
The iff method is null-aware. This means that the type of the returned value from the block is expected as a non-nullable type for the blocks of the elseIf and orElse methods.
See the iff docs for more information.
The when method replaces the switch statement. And can be used to write expressions:
final result = when(place, {
1: () => CompetitionPlace.first,
2: () => CompetitionPlace.second,
3: () => CompetitionPlace.third,
[4,5]: () => CompetitionPlace.honourableMentions,
}).orElse(() => CompetitionPlace.others);
See the when docs for more information.
The tryy method works like the tryy statement, but with the added bonus of being able to write them as expressions. Allowing you to catch multiple exceptions and depending on those exceptions return different values:
final x = tryy(() {
return aMethodThatCouldFail();
}, catches: {
On<SomeException>: () {
return 1;
},
On<OtherException>: () {
return 2;
}
});
See the tryy docs for more information.
The range method allows the user to easily create a lists of certain num types. While being able to define the start value, the end value, the steps it should take to reach the end value and if it should be created in reverse or not:
// [0, 1, 2, 3, 4]
final list1 = range(0, to: 4);
// [4, 3, 2, 1, 0]
final list2 = range(4, downTo: 0);
// [1, 3, 5, 7]
final list3 = range(1, to: 8, step: 2);
// [1, 2, 3]
final list4 = range(0, until: 4);
See the range docs for more information.
Development and Contributing
Interested in contributing? We love merge requests! See the Contribution guidelines.
import 'package:dartlin/dartlin.dart';
import 'package:dartlin/control_flow.dart';
import 'package:dartlin/collections.dart';
Run this command:
With Dart:
$ dart pub add dartlin
With Flutter:
$ flutter pub add dartlin
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
dartlin: ^0.6.1
Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:dartlin/dartlin.dart';
1621508255
We are a prime Kotlin app developer in India. We build and provide the best personalized Android apps, migration services, ongoing maintenance, and management.
We have the most efficient Kotlin developers that build ultramodern, interactive, and secure mobile apps. The technologies we use to create the most advanced Kotlin apps are AR/VR, AI/ML, IoT, etc.
Hire Kotlin app developers in India. Meet us, and we will help you meet all of your technology requirements.
#kotlin app development company india #hire kotlin developers india #kotlin app development company #hire kotlin developers #kotlin development agency #kotlin app programmers
1616586592
The most popular language used for Android app development is Kotlin and recently Kotlin also launched its Cross-Platform app development language Kotlin Multiplatform.
So are you looking to launch a mobile using Kotlin as your Programming Language?
Then you are at the right place as WebClues Infotech offers services to Hire a Dedicated Kotlin Developer who can develop an interactive and rich user-experienced mobile app. Also, WebClues has a flexible pricing model that the business can choose according to its most suitable structure.
So what are you waiting for? Hire a dedicated Kotlin developer from a reputed Web & Mobile app development agency that has successfully served more than 600+ clients.
Book Free Interview: https://bit.ly/3dDShFg
#hire dedicated kotlin developer #hire dedicated kotlin developer #hire kotlin developers #hire kotlin developer #hire dedicated kotlin app developer #hire kotlin app developers india
1609415481
Do you have an idea to develop an android app using Kotlin?
Are you looking for the best Kotlin app development company in the USA? We at AppClues Infotech offering versatile mobile app development services in the USA. We provide custom mobile app development solutions as per your specific business needs with the prevailing market trending technology & features.
Hire our top-notch Kotlin app designers & developers for your project at a cost-effective price.
Our Kotlin App Development Services:
• Custom Android App Development
• Kotlin AR/VR App Development
• Kotlin App UI/UX Design
• Kotlin App QA & Testing- code Optimization
• Kotlin App Migrations
• Kotlin App Maintenance and Upgrades
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#kotlin android app development company #best kotlin android app development usa #kotlin android app development #kotlin for android app development #kotlin mobile app development service #create android app with kotlin
1606541075
Looking for a top Kotlin Android app development company for creating an Android app project? AppClues Infotech is a top Kotlin Android app development company in USA that delivers the most scalable and efficient Kotlin app development services globally.
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#kotlin android app development company #best kotlin android app development usa #kotlin android app development #kotlin for android app development #kotlin mobile app development service #create android app with kotlin
1608099783
Are you looking for the best Kotlin Android App Development Company in USA? We at AppClues Infotech help to create a successful kotlin Android App with creative technology & features at competitive price.
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#kotlin android app development company #best kotlin android app development usa #kotlin android app development #kotlin for android app development #kotlin mobile app development service #create android app with kotlin