Skip to content

Instantly share code, notes, and snippets.

View demirdev's full-sized avatar

Mehmet Demir demirdev

View GitHub Profile
@demirdev
demirdev / stacked_avatars.dart
Created November 29, 2021 16:19
Flutter Stacked Avatars with animation
import 'package:flutter/material.dart';
class StackedAvatars extends StatefulWidget {
StackedAvatars({Key? key}) : super(key: key);
@override
State<StackedAvatars> createState() => _StackedAvatarsState();
}
class _StackedAvatarsState extends State<StackedAvatars>
@demirdev
demirdev / main.dart
Last active December 3, 2021 20:24
Page View with Animation, Delicious Turkish Meals
import 'package:flutter/material.dart';
import 'package:flutter/gestures.dart';
// for more delicious codes follow me
// https://twitter.com/demirdevv
void main() {
runApp(MaterialApp(home:PageViewExample(), scrollBehavior: AppScrollBehavior(),));
}
class PageViewExample extends StatelessWidget {
@demirdev
demirdev / currencies_country_flags.json
Last active April 14, 2022 17:03
Currency list with Country Flag
[
{
"name": "US Dollar",
"symbol": "$",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars",
"countryEmoji": "🇺🇸"
@demirdev
demirdev / countdown_widget.dart
Last active March 1, 2022 07:09
Count Down Widget with Tween Animation in 24 lines of code.
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@demirdev
demirdev / debouncer_mixin.dart
Last active June 13, 2022 13:03
DeBouncer mixin for Dart
import 'dart:async';
mixin DeBouncer {
Timer? _debounce;
deBouncer(Function callback) {
if (_debounce?.isActive ?? false) _debounce?.cancel();
_debounce = Timer(Duration(milliseconds: 300), () {
callback();
});
@demirdev
demirdev / custom_tousands_formatter.dart
Created August 9, 2022 06:23
Custom Tousands Formatter
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:pattern_formatter/pattern_formatter.dart';
/*
Hello #flutter #developers, I used pattern_formatter package
to format prices written in TextFormField.
When user types 0,0 then value formatted to 0 immediately.
For fix this issue I wrote CustomThousandsFormatter.
*/
@demirdev
demirdev / local_storage_service.dart
Last active September 8, 2022 11:56
Local Storage Service with Enum Keys
import 'dart:convert';
import 'package:get_storage/get_storage.dart';
import 'package:quran_app/screens/settings/bloc/settings_bloc.dart';
/// Read custom class from local storage
final SettingsState settings =
LocalStorageKey.settingsObject.readObject(SettingsState.empty());
/// Read email from local storage
@demirdev
demirdev / pinch_to_scale_value.dart
Last active January 3, 2023 08:58
pinch to scale double values, for example change text size with fingers
import 'package:flutter/material.dart';
// learned from: https://copyprogramming.com/howto/flutter-gesturedetector-how-to-pinch-in-out-or-zoom-in-out-text-using-two-fingers
class PinchToScaleValue extends StatefulWidget {
final Widget child;
PinchToScaleValue(
{Key? key,
required this.child,
@demirdev
demirdev / FordCarRadioCodes.md
Created October 3, 2022 09:13
FordCarRadioCodes.md

Privacy Policy

Mehmet Demir built the app as a Commercial or Free app. This SERVICE is provided by Mehmet Demir and is intended for use as is.

Changes to This Privacy Policy

I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page.

This policy is effective as of 2022-03-25

**Privacy Policy**
Mehmet Demir built the app as a Commercial or Free app. This SERVICE is provided by Mehmet Demir and is intended for use as is.
**Changes to This Privacy Policy**
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page.
This policy is effective as of 2022-03-25