Skip to content

Instantly share code, notes, and snippets.

View demirdev's full-sized avatar

Mehmet Demir demirdev

View GitHub Profile
import 'dart:convert';
extension PrettyJson on Object? {
String get prettyJson => const JsonEncoder.withIndent(
' ',
).convert(this);
}
/// Usage
///
@demirdev
demirdev / duolist-terms-of-use-eula
Created October 10, 2022 11:22
duolist Terms Of Use: EULA
Terms & Conditions
By downloading or using the app, these terms will automatically apply to you – you should make sure therefore that you read them carefully before using the app. You’re not allowed to copy, or modify the app, any part of the app, or our trademarks in any way. You’re not allowed to attempt to extract the source code of the app, and you also shouldn’t try to translate the app into other languages, or make derivative versions. The app itself, and all the trade marks, copyright, database rights and other intellectual property rights related to it, still belong to Mehmet Demir.
Mehmet Demir is committed to ensuring that the app is as useful and efficient as possible. For that reason, we reserve the right to make changes to the app or to charge for its services, at any time and for any reason. We will never charge you for the app or its services without making it very clear to you exactly what you’re paying for.
The duolist app stores and processes personal data that you have provided to us, in
@demirdev
demirdev / DuoList Privacy Policy.txt
Created October 8, 2022 07:17
DuoList Privacy Policy
**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-08-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
@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

@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 / 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 / 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 / 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 / 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