Skip to content

Instantly share code, notes, and snippets.

View mskasal's full-sized avatar

Mustafa Samed Kasal mskasal

View GitHub Profile
# Privacy Policy
Mustafa Samed Kasal built the Percle app as a Free app. This SERVICE is provided by Mustafa Samed Kasal at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Percle unless otherwise defined in this Privacy Policy.
@mskasal
mskasal / theme.provider.dart
Created November 28, 2020 19:18
Change theme dynamically, ex. dark/light theme
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/all.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ThemeNotifier extends ChangeNotifier {
final String key = "theme";
SharedPreferences _prefs;
bool _darkTheme;
@mskasal
mskasal / location.provider.dart
Last active October 4, 2022 19:57
Location provider for flutter projects, Riverpod, Location
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:location/location.dart';
class PersonLocationProvider extends ChangeNotifier {
Location _location = new Location();
PermissionStatus _permissionGranted;
StreamController<LocationData> currentLocation = StreamController.broadcast();
@mskasal
mskasal / item_profile.json
Last active March 1, 2020 17:39
iTerm profile
{
"Right Option Key Sends" : 0,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408,
"Blue Component" : 1
},
"Ecrin"
"Eymen"
"Ceylin"
"Ebrar"
"Tuana"
"Esila"
"Esra"
"Enes"
"Talha"
"Ömer"
@mskasal
mskasal / basics.dart
Created July 20, 2019 11:23
Dart and Flutter learning - Medium
// Define a function.
printInteger(int aNumber) {
print('The number is $aNumber.'); // Print to console.
}
// This is where the app starts executing.
main() {
var number = 42; // Declare and initialize a variable.
printInteger(number); // Call a function.
}
[
{
"index": 1,
"storeId": 2971,
"format": "MİGROS",
"storeName": "ACIBADEM M MIGROS",
"geo": "MARMARA BÖLGESİ",
"lat": 29.037458,
"long": 41.001035,
"city": "İSTANBUL",
/**
* nearby.js
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2018, Codrops
* http://www.codrops.com
*/
// File: .storybook/config.js
import { configure, addDecorator } from '@kadira/storybook';
import Theme from './../src/ui/theme';
import React from 'react';
import { ThemeProvider } from 'styled-components'
function loadStories() {
require('../stories');
}
@mskasal
mskasal / Field.js
Created June 18, 2018 08:04 — forked from mxstbr/Field.js
Style Storybook with Styled Components
import React, { PropTypes } from 'react';
import styled from 'styled-components'
const Wrapper = styled.div`
// styles here that used to be for .test
`
const Label = styled.label`
// label styles here
`