Commit 3d5b8b6c authored by Lila NICKLER's avatar Lila NICKLER

Exercice 1

parent 898ed3ca
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class Exercice1 extends StatelessWidget {
Widget build(BuildContext context)
{
var mediaQueryData = MediaQuery.of(context);
return Container(
height:mediaQueryData.size.height - 200 ,
child:Image.network("https://picsum.photos/512/1024"),
);
}
}
import 'package:flutter/material.dart';
import 'Exo.dart';
void main() {
runApp(MyApp());
}
......@@ -29,14 +31,9 @@ class MyHomePage extends StatefulWidget {
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
static Exercice1 exo1 = new Exercice1();
@override
Widget build(BuildContext context) {
return Scaffold(
......@@ -48,21 +45,12 @@ class _MyHomePageState extends State<MyHomePage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
exo1,
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
// This trailing comma makes auto-formatting nicer for build methods.
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment