Skip to content

Instantly share code, notes, and snippets.

@malibayram
Created March 20, 2022 13:56
Show Gist options
  • Save malibayram/88969714f535fdcd6a6aad25ff1a7598 to your computer and use it in GitHub Desktop.
Save malibayram/88969714f535fdcd6a6aad25ff1a7598 to your computer and use it in GitHub Desktop.
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
getData(i + 1);
}
}
Future<void> getData(int sec) async {
await Future.delayed(Duration(seconds: sec));
print("Merhaba");
}
// şu widget
class UIProductModel {
final String imageUrl;
final double price;
final String name;
UIProductModel(this.imageUrl, this.price, [this.name = ""]);
}
abstract class Strings {
String get homeScreen;
String get movieDetailScreen;
String get titleCategories;
String get titleCast;
String sayHello(String name);
}
class ServiceProductModel extends UIProductModel {
ServiceProductModel(
String imageUrl,
double price,
String name,
) : super(imageUrl, price, name);
}
class UIDiscountedProduct extends UIProductModel {
final double percent;
UIDiscountedProduct(
String imageUrl,
double price,
String name,
this.percent,
) : super(
imageUrl,
price,
name,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment