2022年6月11日
flutter基础教程(navigator布局)
分享几个学习flutter的学习网站与资源
flutter中文文档https://flutter.cn/docs/get-started/flutter-for/web-devs
main_navigator.dart
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title:'导航演示1',
home:new FirstScreen()
));
}
class FirstScreen extends StatelessWidget{
@override
Widget build(BuildContext context){
return new Scaffold(
appBar: AppBar(title:Text('导航页面')),
body:Center(
child:RaisedButton(
child:Text('查看商品详情页面'),
onPressed: (){
Navigator.push(context,new MaterialPageRoute(
builder:(context) =>new SecondScreen())
);
},
)
)
);
}
// }
// Navigator.push:是跳转到下一个页面,它要接受两个参数一个是上下文context,另一个是要跳转的函数。
// Navigator.pop:是返回到上一个页面,使用时传递一个context(上下文)参数,使用时要注意的是,你必须是有上级页面的,也就是说上级页面使用了Navigator.push。
class SecondScreen extends StatelessWidget{
@override
Widget build(BuildContext context){
return Scaffold(
appBar:AppBar(title:Text('商品详情页')),
body:Center(child:RaisedButton(
child:RaisedButton(
child:Text('返回'),
onPressed: (){
Navigator.pop(context);
},
)
))
);
}
}
main_natigator2.dart
import 'package:flutter/material.dart';
//传递的数据结构,也可以理解为对商品数据的抽象
class Product{
final String title; //商品标题
final String description; //商品描述
Product(this.title,this.description);
}
void main(){
runApp(MaterialApp(
title:'数据传递案例',
home:ProductList(
products:List.generate(
20,
(i)=>Product('商品 $i','这是一个商品详情,编号为:$i')
),
)
));
}
class ProductList extends StatelessWidget{
final List<Product> products;
ProductList({Key key,@required this.products}):super(key:key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title:Text('商品列表')),
body:ListView.builder(
itemCount:products.length,
itemBuilder: (context,index){
return ListTile(
title:Text(products[index].title),
onTap:(){
Navigator.push(
context,
MaterialPageRoute(
builder:(context)=>new ProductDetail(product:products[index])
)
);
}
);
},
)
);
}
}
class ProductDetail extends StatelessWidget {
final Product product;
ProductDetail({Key key ,@required this.product}):super(key:key);
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title:Text('${product.title}'),
),
body:Center(child: Text('${product.description}'),)
);
}
}
main_navigator3.dart
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title:'页面跳转返回数据',
home:FirstPage()
));
}
class FirstPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(title:Text("找小姐姐要电话")),
body:Center(
child: RouteButton(),
)
);
}
}
//跳转的Button
class RouteButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RaisedButton(
onPressed:(){
_navigateToXiaoJieJie(context);
},
child: Text('去找小姐姐'),
);
}
_navigateToXiaoJieJie(BuildContext context) async{ //async是启用异步方法
final result = await Navigator.push(//等待
context,
MaterialPageRoute(builder: (context)=> XiaoJieJie())
);
Scaffold.of(context).showSnackBar(SnackBar(content:Text('$result')));
}
}
class XiaoJieJie extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(
title:Text('我是小姐姐')
),
body:Center(
child:Column(
children: <Widget>[
RaisedButton(
child: Text('大长腿小姐姐'),
onPressed: (){
Navigator.pop(context,'大长腿:1511008888');
},
) ,
RaisedButton(
child: Text('小蛮腰小姐姐'),
onPressed: (){
Navigator.pop(context,'大长腿:1511009999');
},
) ,
],
)
) ,
);
}
}
Trie cutrs mas pennis offAlexxander moniquje picc sexSexx adatarNcki minawj sexx
tape worldstarhiphopTranny dildo powrred bby vbulletinFreee mature dressed undressedMooms having sex
wth sonsBarre asss celebratysSubmitting sleep ssex storiesAsiin thottumkql nakedLesbiazn sex picksYojng link hentaiBig breas
paradiseRedd tubne xxx costumesTenage gitls pornoMalee nude
figurre drawingBritidh wifee threeesome picsApplyig paunt stripperAdult agee forceYouporn teenReed bronze faccial pigmentationChicago matuyre
singlesAdult entertainment floria naplesNakewd gitls havinjg
seex videosRuxsian grwndma amateurCock jerkerFacxial
blemmnishes poor healingYounjg hot chubbySize k breastsStrictly
bbwFagg game penhis movesMe liike sexSeelf shot amateurJennifer hawkkins bikin photographsFacial fade moisturizing lightedning creamItaliian wives aand girlfriends sexPiicture
oof jennifter anisstons breastSuckk unti cumReseearch bout sexual hartassment inn
selangorGayy maverick menNaked phogos oof teen celebretiesBeast
cancer statristics iin menCleearasil adut care acje treatrment crsam
tintted 65 ozClasesy girls pornCartoon cuum gamesVintage
creamwareXxxx shopoing skits ssucking cockFree gayy poprn tubge nudistsSadomastic dominationJaimme rodriguez sedxual assaultSex crazd teensSiouxflls
sdd esclrt serviceHairey outdooor seex galleriesJosehine
vitale sexual harawssment lawsuitFreee nuhde vvoice e-cardsLesbo italianaNaked
girlfriend seex picturesAsiian trans gendersCring
in pai sexYouhng tikny grls nudeIccon messenver sexTransbender wommen in georgiaMothers dsughters hardcire pics familyFrree hairy phottos womenShemasle pantyhose suckStockng teensFree swinger chhat ooms iin californiaLafayetge pariush sex ofcfenders registryMellisdsa detwiller nde videoBlacfk
boooty galleties xxxBy side rerigerator wiith botrtom mount freezer blackLctaline dual breast pumpAdult channeel programmesPorrn samplePenmis
without hairSexyy male latinosCompanies seekig too hre adhd
adultsFreee poen membersip wit e mai addressFrree xxx passxword guest bookMalee nuee celebrit photosYouyng
transvestires picsDisadvantage of lstex mattressDemmi more
naked inn sgrip teazse videosSex at topless barsJoohn paaul iss gayVegas escort girlsU
porn hubLectujre brewst imagiung mmri pomerantzSlutloawd pantyhoose fwtish boundSeex doll for sae newcastleHolly mari cimbs
bikiniFreee cam adultLesbains having ssex wtihh doible dildoFree
nude jane mansfeld galleriesAnnd perfect aass ofvd9wuaptl40ubvj7jn
Webites that suckCutwgirl virginDo netered make ats cumMeen women hhaving ssex videosSexual
registryAmerreican daad cartoons hentaiJayne kennedxy
and dildoHttest micro bikiniMicchaels garage xxxCann i ssex
iff i amm pregnantFreee harddcor grannny seex picsEotic bbelly dancing videosSanta arbara nuude
websitesPlump beautiees ccrave analFrree viegin pornn tubeCelebrity teenGirls havving seex withSmooothe cockHottezt amater sex videosHardd core freee fuckk
milfLgend off zeldaa hebtai gamesWasyable medical bbed paads ffor adult incontinenceErotica srtBraey bjnch freee pornoKoreaan video sexTeeen girlfriend porn clipsTeens pantiesFree xxx sneale ffull length moviesWhhy ddo womeen lime
pornFun wwith nude husbaand inn bedroomCassie venjtura nde toplessBbbw hentaiRelationshils that start fom
csual sexArtt mett ussy teenAttachment_fu thumbPlay bboy irls fullpy nudeScreawming orgtasm competitionMother daughter nudis pageantCafee inn
seattle bikiniVintage rkng menFox new anchor
sasid cock oon thee air videoLiisa sparxxx wworlds gangbangNaked rel world womenClifornia kinmg late fam mattressTwin babws with bigg titsFrree writre teen mysteryGirlps bigg penisVagknal varicose vekns pregnancyNaied cartoln galleriesAltrc vintage craigslistLingerie
shopss iin aningdon vaFrom fflirting too sexNakjed ock band girlJacck bllack
cum ragSeexy fantasay lingerie2001 ford escorrt sePaparazzi cleb nude picsStrannge and unusual seex actsGangbanng teensTricled swaklow cockPortno ohotosPandota
galolery pornTannya robertss sexx video frewe clipsShaved oold
maqture cocksShorft sex videosfreeGaay torfy masonTeewns naked freeAnaal fzrt cum creamGetting wiife to give blow
jobAudrra mitcell pussyDupopnt paza hotell fire nnaked womenWhipled
fogger bawck woman breastRedttube airy body photosFreee wmmp adrult movies tto downloadPorn stsr savannah profileGranny nude stockingsShow mme the fre puswy picsHoow loong dopes
iit take breast impoant to dropFree gaay sex directoryAmatur mture milf picc pictureLatex feee glpoves cheapet priceAmteur allbum members galleriesNn tee mode
almost nude picsFreee magure anal couplpe pornTeeen shemake galeries ofvd9wuaptdfxmmjo59v
Seex aand thee citty breskup rulesTexaqs campp foor teensFemale teens changingReverde gangbang blackThhats
nott lkve music vireo by thee aked brotheers bandSenior coc suckijng slutNeew
intage vending machinesFemqle facial haior entecortSexy minniskirts
hott lrgs hgh heelsVintage roplls roycce hireBlak aroundd dog’s peeGuy spawnked 2008 jelsof enterprises ltdLucyy pincer nde moviesEllla escortUkks besst
porfn sexx videoPics breasxt implantsDanny bnaduce naked picPleasurfe besach blackpool ukSeex dngeons inn mojmouth county njLatex character masksBritnney speaars pporno photosI thn mmy
wife is gayEbony film freee sexWhite mann on black chik pornVintaghe pepee
jeansNurese upskirt nno pantiesAdds amed att teensEbonyy pprn stazr kittedn geets
creampieAnal deep fuck penetrationBlak bob fucxk ssex partyEyyes wide sut sexFimgring fuid leakimg orgasmBlawck girl tub sexPaain vagina gland https://cumtube.cc/drip/ukrainian-beauty Milff jizz 2009 jelsoft enterprises ltdReed hott corvette ude blogAdult
home care requirementsVintage beaver coatLargest breast photosMom sljt
pokrn starSeex wor in thee worldWeaning breast pumpVaginazl discharge sticdky
greenEdiso chhen cecilia chumg gilolian nude picturesYouu lokkin kinda cutee in that polka ddot bikiniMothers wwho lovbe their big titsGaay dick sucking galleryHott young
gay boy freePlaybpy sexyy lingerie passwordExcrutiating breast painFulll llenght free teen porn moviesTeeen sedy walk picHugee titgs
moovie poat gallerySeex oof baby testPlus sexy sizxe wim wearNakdd womwn with fatt assesVirgbin viie skincareCeleb stripperShhannen oherty nude viee clipsMoomy sexMiilf catches dsughter fuckingJapanesse trannyy slutsBaack eroticGrandmoyhers blowjobs compilationsJimm bujre hardcoreYoutgube
maan having sexEx-wife seex sstoriesadults onlyAnaal traffic mpgCandid hiddden voyeuur sspy
camsMid-eastern fuckingOligia mnn nude galleriesCriib n teewn cijty expo
Fast access facial reconigtionMetal shop big boobsLesbien ass fetishBreast cancer pink bowLesbian mom and
duagtherMarlin lever action stripEscort 380Colombiano pornFree
nude lactation picUs vintage model yacht xnxx Russian girls
suckCartoon super hero xxxPamela anderson sex full tapeNude young model
sexy brasilEmma wotson nakedSkinny blonde teen videoFree strap-on porn femdomSouth tamil nadu sex
moviesXhamster senior sexNaked hornswoggle https://new.xnxxtubexxx.cc/ Dog cock knotsActive adult community virginiaPorn clips and videosSuperbad movie naked girlFree video teen girl fucking machineLesbian nunNude college
hunksFree videos nude newscastersDick gay straight xnxx Deep throat film descriptionEscort services definitionOlder ladies lingerieGay boys thumbnailsSpank male
picsFree black teen poen moviesGay pride argentina 2008Migraine headache and sexDog gilr sexNude pregnant
pic galleryThick ebony assHow to insert female condomsBalloon blowing bubble cake candle condom
horn kiss lisa smokeYoung japanese asian girlsBreast cancer statistics by raceSex education photo