Skip to content

Instantly share code, notes, and snippets.

View abdullahalamodi's full-sized avatar
💙
flutter time

Abdullah Alamodi abdullahalamodi

💙
flutter time
  • اليمن حضرموت
View GitHub Profile
@mg3994
mg3994 / humpday_2024-06-12_2.dart
Created June 12, 2024 18:45 — forked from slightfoot/humpday_2024-06-12_2.dart
Custom Multi Child Layouts - by Simon Lightfoot - Humpday Q&A :: 12th June 2024 #Flutter #Dart - https://www.youtube.com/watch?v=QBmqKvw_0s8
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
@slightfoot
slightfoot / humpday_2024-06-12_1.dart
Last active June 12, 2024 21:29 — forked from austinstoker/main.dart
Force Intrinsics - by Simon Lightfoot - Humpday Q&A :: 12th June 2024 #Flutter #Dart - https://www.youtube.com/watch?v=QBmqKvw_0s8
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
@lukepighetti
lukepighetti / list_tile_occluded_app_bar.dart
Created August 25, 2022 19:08
A way to update AppBar title based on what ListTile is being occluded https://twitter.com/luke_pighetti/status/1562871407960522755
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@Roaa94
Roaa94 / infinite_scrolling.dart
Last active September 25, 2023 15:47
Infinite Scrolling with Riverpod
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:dio/dio.dart';
// Disclaimer: This uses the "The Movie Database API (TMDB)"
// https://developers.themoviedb.org/3/getting-started
// With this endpoint:
// https://developers.themoviedb.org/3/people/get-popular-people
/// The FutureProvider that does the fetching of the paginated list of people
@slightfoot
slightfoot / smooth_scroll.dart
Created July 14, 2022 17:35
Correct smooth scroll for Flutter Web - by Simon Lightfoot - 14th July 2022
// MIT License
//
// Copyright (c) 2022 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@gaetschwartz
gaetschwartz / settings.json
Last active May 9, 2024 07:21
Nest files in Flutter projects on VSCode, inspired from https://github.com/antfu/vscode-file-nesting-config
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
"*.dart": "$(capture).g.dart, $(capture).freezed.dart",
},
targets:
$default:
builders:
freezed:freezed:
enabled: True
generate_for:
- "lib/gears/network/**"
- "lib/gears/modules/**"
- "lib/gears/services/session/conductor/*.dart"
- "lib/gears/services/session/data/data.dart"
@ajmaln
ajmaln / downloadFile.dart
Last active February 20, 2024 17:12
Download file with progress in Dart/Flutter using 'http' package
import 'dart:typed_data';
import 'dart:io';
import 'package:http/http.dart';
import 'package:path_provider/path_provider.dart';
downloadFile(String url, {String filename}) async {
var httpClient = http.Client();
var request = new http.Request('GET', Uri.parse(url));