Skip to content

Instantly share code, notes, and snippets.

View fabiancrx's full-sized avatar
🏠
Working from home

fabiancrx

🏠
Working from home
View GitHub Profile
@fabiancrx
fabiancrx / keyboard_dismiss.dart
Created August 23, 2021 15:38
Dissmiss the keyboard in Flutter when tapped or scrolled
/// Removes the current focus and hides the keyboard when
/// the user drags or taps this widget.
///
/// Place this widget somewhere near the top of your widget
/// tree and when the user drags or taps outside of a focused widget,
/// the focus will be removed and the keyboard will be hidden.
class KeyboardDismiss extends StatelessWidget {
final Widget child;
final bool dismissOnTap;
@fabiancrx
fabiancrx / pageview_adaptive.dart
Created May 21, 2021 15:40
Flutter PageView with different page size
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
import 'dart:convert';
void main() {
String dataString = """[
{
"placeImage":"images/fish2.jpg",
"placeName":"Ikan 2",
"placeItem":["fish, crab, seafood"],
"minOrder":20
}