Property/Callback | Description |
---|---|
onTapDown |
OnTapDown is fired everytime the user makes contact with the screen. |
onTapUp |
When the user stops touching the screen, onTapUp is called. |
onTap |
When the screen is briefly touched, onTap is triggered. |
onTapCancel |
When a user touches the screen but does not complete the Tap , this event is fired. |
onDoubleTap |
onDoubleTap is called when the screen is touched twice in quick succession. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
//Main function. The entry point for your Flutter app. | |
void main() { | |
runApp( | |
MaterialApp( | |
home: Scaffold( | |
body: DemoApp(), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
class PageViewIndicator extends StatefulWidget { | |
PageViewIndicator({ | |
this.controller, | |
this.pageCount, | |
this.color: Colors.lightBlueAccent, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:io'; | |
void main() { | |
TestHttpServer().createHttpServer(); | |
} | |
class TestHttpServer { | |
HttpServer server; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Win32", | |
"includePath": [ | |
"${workspaceFolder}/**" | |
], | |
"defines": [ | |
"_DEBUG", | |
"UNICODE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShadowCard extends StatelessWidget { | |
const ShadowCard({ | |
Key key, | |
this.color, | |
this.elevation = 1.0, | |
this.shape, | |
this.margin = const EdgeInsets.all(4.0), | |
this.clipBehavior = Clip.none, | |
this.child, | |
this.semanticContainer = true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class StepperWidget extends StatelessWidget { | |
const StepperWidget({ | |
Key key, | |
@required this.tabController, | |
@required this.headings, | |
@required this.textStyle, | |
this.height = 48.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class ConstrainedView extends StatelessWidget { | |
const ConstrainedView({Key key, this.child}) : super(key: key); | |
final Widget child; | |
@override | |
Widget build(BuildContext context) { | |
return LayoutBuilder( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_web/material.dart'; | |
class ResponsiveLayout extends StatelessWidget { | |
const ResponsiveLayout({ | |
Key key, | |
@required this.largeChild, | |
this.mediumChild, | |
this.smallChild, | |
this.largeBreakPoint = 1200.0, | |
this.mediumBreakPoint = 800.0, |
OlderNewer