Skip to content

Instantly share code, notes, and snippets.

Avatar
🏝️
Working from home (limited availability)

Onat Çipli onatcipli

🏝️
Working from home (limited availability)
View GitHub Profile
View restaurant_detail.json
{"data":{"id":5,"fleet_id":0,"address":"Bilbao, 2, 03001 Alicante","admin_commission":0,"allergen_policy":"<p>Gluten, nuts, discos<\/p>","collect_at_outlet_enabled":true,"created_at":"2020-04-29 11:48:07","delivery_enabled":true,"description":"<p><span style=\"color: rgb(28, 30, 33); font-family: system-ui, -apple-system, system-ui, \".SFNSText-Regular\", sans-serif; font-size: 12px;\">El Portal Taberna & Wines es un Bar, donde se conjuga las tapas, los platos gastron\u00f3micos, los vinos y las copas en un ambiente informal, divertido y elegante<\/span><br><\/p>","distance":null,"email":null,"eta":35,"eta_buffer":15,"has_media":true,"information":"<p><br><\/p>","is_accepting_asap_order":true,"is_accepting_order_now":true,"is_open_now":true,"is_pre_order_allowed":true,"latitude":"38.343967","longitude":"-0.483671","media":[{"icon":"https:\/\/staging-images.caboodleit.co\/admin\/386\/conversions\/berries-granola-icon.jpg","id":386,"mime_type":"image\/jpeg","name":"berries-granola","thumb":"https:\/\/staging-im
View restaurants.json
{"data":[{"id":1,"fleet_id":0,"address":"11 O'Connell Street Upper, North City, Dublin, Ireland","admin_commission":15,"allergen_policy":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ac cursus urna. Praesent placerat pulvinar ex in pretium. Nam eget tempus est, in vulputate purus. Duis eu dapibus dolor. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec mattis massa ut lorem cursus, eget egestas sapien iaculis. Etiam mollis diam non orci feugiat, et finibus sem molestie. Cras feugiat ligula eget hendrerit mollis. Sed et massa non mauris fringilla mollis. Ut non egestas est. Morbi commodo justo velit, non auctor ipsum auctor ac. Vivamus mollis ac nunc sed pharetra.\r\nPhasellus at nunc id odio consectetur sagittis a eget enim. Donec arcu ipsum, efficitur eu rhoncus quis, fringilla ac ex. Quisque vel iaculis lacus. Quisque non eros ex. Phasellus aliquam nibh id nunc vulputate convallis ac sit amet nunc. Vestibulum ut leo nec orci fringilla laoreet. Class aptent taciti sociosqu
@onatcipli
onatcipli / flutter_build_publish_web.yml
Last active Jun 20, 2021
building and publishing flutter web application
View flutter_build_publish_web.yml
name: Flutter Web
on:
push:
branches:
- master
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit_secret}}
@onatcipli
onatcipli / hover_detector.dart
Created Dec 8, 2019
detect hover in flutter web
View hover_detector.dart
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:universal_html/html.dart' as html;
// Also add id="app_container" to web/index.html body tag
//
//
//<!DOCTYPE html>
//<html>
//<head>
@onatcipli
onatcipli / flutter_generate.dart
Created Nov 16, 2019
for an Medium article codding step
View flutter_generate.dart
import 'package:args/args.dart';
main(List<String> arguments) {
final ArgParser argParser = ArgParser();
argParser.addOption("name", abbr: "n");
ArgResults results = argParser.parse(arguments);
if (results['name'] != null) {
View scrollbar_display_always.dart
import 'package:flutter/material.dart';
/// able to show scrollbar always with following example
/// available with changes from this branch https://github.com/onatcipli/flutter/tree/scrollbar_display_always
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
View login_page.dart
import 'package:daily_tasks/pages/home_page.dart';
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_sign_in/google_sign_in.dart';
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => _LoginPageState();
}
View main.dart
import 'package:daily_tasks/pages/login_page.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
View main.dart
FloatingActionButton(
onPressed: () async {
await CustomAlertBox.showCustomAlertBox(
context: context,
willDisplayWidget: Container(
child: Text('My custom alert box, used from example!!'),
));
},
tooltip: 'Show Custom Alert Box',
child: Icon(Icons.message),
@onatcipli
onatcipli / custom_alert_box.dart
Created Jun 15, 2019
Dart Package Medium Article
View custom_alert_box.dart
library custom_alert_box;
import 'package:flutter/material.dart';
class CustomAlertBox {
/// Bu şekilde döküman yorumları oluşturabilirsiniz kullanan kişiler için faydalı olur.
static Future showCustomAlertBox({
@required BuildContext context,
@required Widget willDisplayWidget,
}) {