Skip to content

Instantly share code, notes, and snippets.

View IsmailAlamKhan's full-sized avatar

Md Ismail Alam Khan IsmailAlamKhan

View GitHub Profile
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.
@IsmailAlamKhan
IsmailAlamKhan / appicon.sh
Last active April 10, 2025 09:59
Building and distribute a flutter macos app without App Store
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
@IsmailAlamKhan
IsmailAlamKhan / main.dart
Last active July 16, 2023 10:51
Random code generate
// 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();
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@IsmailAlamKhan
IsmailAlamKhan / main.dart
Last active June 27, 2022 20:08
Get a tree view of the dir you provide or the current dir you are in.
/// 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});
}
final duplicatedList = <String>[
'Tayfer',
'Ismail',
'RoyalCoder',
'Tayfer',
'RoyalCoder',
'Tayfer',
'FatherRussia',
'RoyalCoder',
'Sdk',
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,
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(
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);
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());