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
1. Display the current weather (temperature, weather description, and icon) for a user-specified location. | |
2. Use a public weather API like OpenWeatherMap (https://openweathermap.org/api) or any other API of your choice. The candidate should make an API request to fetch the weather data. | |
3. Provide a text input field where the user can enter the name of a city or a location. | |
4. When the user enters a location and taps a "Get Weather" button, the app should fetch the weather data for that location and display it on the screen. | |
5. Implement proper error handling and show error messages to the user if the location is not found or if there is a network-related issue. |
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
mkdir AppIcon.iconset | |
sips -z 16 16 appicon.png --out AppIcon.iconset/icon_16x16.png | |
sips -z 32 32 appicon.png --out AppIcon.iconset/[email protected] | |
sips -z 32 32 appicon.png --out AppIcon.iconset/icon_32x32.png | |
sips -z 64 64 appicon.png --out AppIcon.iconset/[email protected] | |
sips -z 128 128 appicon.png --out AppIcon.iconset/icon_128x128.png | |
sips -z 256 256 appicon.png --out AppIcon.iconset/[email protected] | |
sips -z 256 256 appicon.png --out AppIcon.iconset/icon_256x256.png | |
sips -z 512 512 appicon.png --out AppIcon.iconset/[email protected] | |
sips -z 512 512 appicon.png --out AppIcon.iconset/icon_512x512.png |
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
// Generated using Google bard | |
import 'dart:math'; | |
void main() { | |
String passcode = generatePasscode(); | |
print('Generated Passcode: $passcode'); | |
} | |
String generatePasscode({int length = 8, bool useAlphabet = true}) { | |
Random random = Random(); |
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
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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
/// Used package https://pub.dev/packages/flutter_simple_treeview | |
/// and https://pub.dev/packages/url_launcher to open the file | |
class FileTreeItem { | |
final String name; | |
final String path; | |
final List<FileTreeItem>? children; | |
FileTreeItem({required this.name, this.children, required this.path}); | |
} |
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
final duplicatedList = <String>[ | |
'Tayfer', | |
'Ismail', | |
'RoyalCoder', | |
'Tayfer', | |
'RoyalCoder', | |
'Tayfer', | |
'FatherRussia', | |
'RoyalCoder', | |
'Sdk', |
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
void main() { | |
hello(); | |
} | |
enum RequestType1 { image, video } | |
extension on String { | |
T getEnum<T extends Enum>(List<T> values) { | |
return values.firstWhere( | |
(e) => describeEnum(e) == this, |
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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
import 'package:flutter/material.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
final myNotifierProvider = StateNotifierProvider<MyNotifier, MyState>((_) => MyNotifier()); | |
void main() => runApp(const ProviderScope(child: MyApp())); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp(title: 'Material App', home: Home()); |
NewerOlder