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:medium_app_ui/NewsArticle.dart'; | |
import 'package:medium_app_ui/NewsHelper.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( |
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:chess_vectors_flutter/chess_vectors_flutter.dart'; | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin { |
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:location/location.dart'; | |
class ListenPage extends StatefulWidget { | |
@override | |
_ListenPageState createState() => _ListenPageState(); | |
} | |
class _ListenPageState extends State<ListenPage> { |
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:geolocator/geolocator.dart'; | |
import 'dart:async'; | |
class GeoListenPage extends StatefulWidget { | |
@override | |
_GeoListenPageState createState() => _GeoListenPageState(); | |
} | |
class _GeoListenPageState extends State<GeoListenPage> { |
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
GridView.builder( | |
shrinkWrap: true, | |
physics: NeverScrollableScrollPhysics(), | |
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | |
crossAxisCount: columnCount, | |
), | |
itemBuilder: (context, position) { | |
// Get row and column number of square | |
int rowNumber = (position / columnCount).floor(); | |
int columnNumber = (position % columnCount); |
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'; | |
enum CardSuit { | |
spades, | |
hearts, | |
diamonds, | |
clubs, | |
} | |
enum CardType { |
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:solitaire_flutter/playing_card.dart'; | |
import 'package:solitaire_flutter/transformed_card.dart'; | |
typedef Null CardAcceptCallback(List<PlayingCard> card, int fromIndex); | |
// This is a stack of overlayed cards (implemented using a stack) | |
class CardColumn extends StatefulWidget { | |
// List of cards in the stack |
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:solitaire_flutter/card_column.dart'; | |
import 'package:solitaire_flutter/playing_card.dart'; | |
import 'package:solitaire_flutter/transformed_card.dart'; | |
// The deck of cards which accept the final cards (Ace to King) | |
class EmptyCardDeck extends StatefulWidget { | |
final CardSuit cardSuit; | |
final List<PlayingCard> cardsAdded; | |
final CardAcceptCallback onCardAdded; |
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 DemoPage extends StatefulWidget { | |
@override | |
_DemoPageState createState() => _DemoPageState(); | |
} | |
class _DemoPageState extends State<DemoPage> { | |
@override | |
Widget build(BuildContext context) { |
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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |