Skip to content

Instantly share code, notes, and snippets.

View onatcipli's full-sized avatar
🏝️
Working from home (limited availability)

Onat Çipli onatcipli

🏝️
Working from home (limited availability)
View GitHub Profile
@onatcipli
onatcipli / go_router_example.dart
Last active May 6, 2024 12:29
go_router_example.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
main() {
CustomNavigationHelper.instance;
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@onatcipli
onatcipli / flutter_build_publish_web.yml
Last active June 20, 2021 06:06
building and publishing flutter web application
name: Flutter Web
on:
push:
branches:
- master
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit_secret}}
@onatcipli
onatcipli / hover_detector.dart
Created December 8, 2019 18:46
detect hover in flutter web
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 November 16, 2019 08:06
for an Medium article codding step
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) {
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();
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();
}
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',
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 June 15, 2019 16:33
Dart Package Medium Article
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,
}) {
@onatcipli
onatcipli / main.dart
Created March 29, 2019 08:08
Stackoverflow answer
void main() {
var myText = "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222