Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matis SPINELLI
amse
Commits
1a719333
Commit
1a719333
authored
Feb 19, 2024
by
m-spi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TP2 exo5
parent
62667a66
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
482 additions
and
51 deletions
+482
-51
package_config.json
tp2/.dart_tool/package_config.json
+3
-3
package_config_subset
tp2/.dart_tool/package_config_subset
+1
-1
version
tp2/.dart_tool/version
+1
-1
_composite.stamp
tp2/build/da9876a55c7cc0664296ca819423bc7c/_composite.stamp
+1
-0
gen_dart_plugin_registrant.stamp
...5c7cc0664296ca819423bc7c/gen_dart_plugin_registrant.stamp
+1
-0
gen_localizations.stamp
.../da9876a55c7cc0664296ca819423bc7c/gen_localizations.stamp
+1
-0
ebbe37bbdbae954559adaa7d65e2e763.cache.dill.track.dill
...ld/ebbe37bbdbae954559adaa7d65e2e763.cache.dill.track.dill
+0
-0
NOTICES
tp2/build/flutter_assets/NOTICES
+406
-14
exo5.dart
tp2/lib/exo5.dart
+60
-24
pubspec.lock
tp2/pubspec.lock
+8
-8
No files found.
tp2/.dart_tool/package_config.json
View file @
1a719333
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
"name"
:
"flutter"
,
"name"
:
"flutter"
,
"rootUri"
:
"file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter"
,
"rootUri"
:
"file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter"
,
"packageUri"
:
"lib/"
,
"packageUri"
:
"lib/"
,
"languageVersion"
:
"3.
2
"
"languageVersion"
:
"3.
3
"
},
},
{
{
"name"
:
"flutter_lints"
,
"name"
:
"flutter_lints"
,
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
"languageVersion"
:
"3.4"
"languageVersion"
:
"3.4"
}
}
],
],
"generated"
:
"2024-02-1
4T09:30:03.769996
Z"
,
"generated"
:
"2024-02-1
9T13:16:14.727949
Z"
,
"generator"
:
"pub"
,
"generator"
:
"pub"
,
"generatorVersion"
:
"3.4.0-1
31
.0.dev"
"generatorVersion"
:
"3.4.0-1
54
.0.dev"
}
}
tp2/.dart_tool/package_config_subset
View file @
1a719333
...
@@ -103,7 +103,7 @@ sky_engine
...
@@ -103,7 +103,7 @@ sky_engine
file:///home/spinelli/IMT/M1/AMSE/flutter/bin/cache/pkg/sky_engine/
file:///home/spinelli/IMT/M1/AMSE/flutter/bin/cache/pkg/sky_engine/
file:///home/spinelli/IMT/M1/AMSE/flutter/bin/cache/pkg/sky_engine/lib/
file:///home/spinelli/IMT/M1/AMSE/flutter/bin/cache/pkg/sky_engine/lib/
flutter
flutter
3.
2
3.
3
file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter/
file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter/
file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter/lib/
file:///home/spinelli/IMT/M1/AMSE/flutter/packages/flutter/lib/
flutter_test
flutter_test
...
...
tp2/.dart_tool/version
View file @
1a719333
3.20.0-4.0.pre.92
3.20.0-10.0.pre.44
\ No newline at end of file
\ No newline at end of file
tp2/build/da9876a55c7cc0664296ca819423bc7c/_composite.stamp
0 → 100644
View file @
1a719333
{"inputs":[],"outputs":[]}
\ No newline at end of file
tp2/build/da9876a55c7cc0664296ca819423bc7c/gen_dart_plugin_registrant.stamp
0 → 100644
View file @
1a719333
{"inputs":[],"outputs":[]}
\ No newline at end of file
tp2/build/da9876a55c7cc0664296ca819423bc7c/gen_localizations.stamp
0 → 100644
View file @
1a719333
{"inputs":[],"outputs":[]}
\ No newline at end of file
tp2/build/ebbe37bbdbae954559adaa7d65e2e763.cache.dill.track.dill
0 → 100644
View file @
1a719333
File added
tp2/build/flutter_assets/NOTICES
View file @
1a719333
This diff is collapsed.
Click to expand it.
tp2/lib/exo5.dart
View file @
1a719333
...
@@ -8,7 +8,6 @@ class Tile {
...
@@ -8,7 +8,6 @@ class Tile {
Tile
({
required
this
.
image
,
required
this
.
alignment
});
Tile
({
required
this
.
image
,
required
this
.
alignment
});
Widget
croppedImageTile
(
double
widthFactor
)
{
Widget
croppedImageTile
(
double
widthFactor
)
{
print
(
"creating single tile"
);
return
FittedBox
(
return
FittedBox
(
fit:
BoxFit
.
fill
,
fit:
BoxFit
.
fill
,
...
@@ -42,31 +41,68 @@ class _Exo5 extends State<Exo5> {
...
@@ -42,31 +41,68 @@ class _Exo5 extends State<Exo5> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
print
(
"building state"
);
print
(
"building state"
);
int
i
=
0
;
int
j
=
0
;
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'Display a Tile as a Cropped Image'
),
title:
const
Text
(
'Display a Tile as a Cropped Image'
),
centerTitle:
true
,
centerTitle:
true
,
),
),
body:
body:
Column
(
children:
[
Column
(
Container
(
children:
[
margin:
const
EdgeInsets
.
all
(
10.0
),
Text
(
"col"
),
child:
SizedBox
(
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.7
,
margin:
const
EdgeInsets
.
all
(
20.0
),
width:
MediaQuery
.
of
(
context
).
size
.
height
*
0.7
,
child:
GridView
.
count
(
child:
GridView
.
builder
(
primary:
false
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
padding:
const
EdgeInsets
.
all
(
1
),
crossAxisCount:
colNb
,
crossAxisSpacing:
1
,
),
mainAxisSpacing:
1
,
itemCount:
colNb
*
colNb
,
crossAxisCount:
colNb
,
// Nombre de colonnes
itemBuilder:
(
BuildContext
context
,
int
index
)
{
children:
[
Text
(
"aaaa"
),
Text
(
"bbb"
),
Text
(
"ccc"
)]
// createTilesFromImage(colNb)
Tile
tile
;
)),
tile
=
Tile
(
image:
image
,
alignment:
],
Alignment
(-
1
+
2
*
j
.
toDouble
()
/
(
colNb
.
toDouble
()
-
1
),
))
-
1
+
2
*
i
.
toDouble
()
/
(
colNb
.
toDouble
()
-
1
))
;
);
}
int
ii
=
i
;
int
jj
=
j
;
j
++;
if
(
j
==
colNb
){
i
++;
j
=
0
;
}
return
Flexible
(
child:
Container
(
margin:
EdgeInsets
.
all
(
10.0
/
colNb
),
child:
InkWell
(
child:
tile
.
croppedImageTile
(
1
/
colNb
),
onTap:
()
{
print
(
"tapped on "
+
ii
.
toString
()
+
" "
+
jj
.
toString
());
}
)
));
}
)
)
),
Slider
(
value:
colNb
.
toDouble
(),
min:
2
,
max:
6
,
onChanged:
(
double
value
)
{
setState
(()
{
colNb
=
value
.
toInt
();
});
}
),
]),
);
}
List
<
Widget
>
createTilesFromImage
(
int
colNb
)
{
List
<
Widget
>
createTilesFromImage
(
int
colNb
)
{
print
(
"creating tiles"
);
print
(
"creating tiles"
);
...
@@ -74,13 +110,13 @@ class _Exo5 extends State<Exo5> {
...
@@ -74,13 +110,13 @@ class _Exo5 extends State<Exo5> {
List
<
Widget
>
res
=
<
Widget
>[];
List
<
Widget
>
res
=
<
Widget
>[];
for
(
int
i
=
0
;
i
<
colNb
;
i
++){
for
(
int
i
=
0
;
i
<
colNb
;
i
++){
for
(
int
j
=
0
;
j
<
colNb
;
j
++){
for
(
int
j
=
0
;
j
<
colNb
;
j
++){
tile
=
Tile
(
image:
image
,
alignment:
Alignment
(-
1
+
2
*
j
.
toDouble
()
/
colNb
.
toDouble
(),
-
1
+
2
*
i
.
toDouble
()
/
colNb
.
toDouble
()));
tile
=
Tile
(
image:
image
,
alignment:
Alignment
(-
1
+
2
*
j
.
toDouble
()
/
(
colNb
.
toDouble
()
-
1
),
-
1
+
2
*
i
.
toDouble
()
/
(
colNb
.
toDouble
()
-
1
))
);
res
.
add
(
InkWell
(
res
.
add
(
InkWell
(
child:
tile
.
croppedImageTile
(
1
/
colNb
),
child:
tile
.
croppedImageTile
(
1
/
colNb
),
onTap:
()
{
print
(
"tapped on tile
$i
$j
"
);
},
));
));
}
}
}
}
...
...
tp2/pubspec.lock
View file @
1a719333
...
@@ -79,26 +79,26 @@ packages:
...
@@ -79,26 +79,26 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker
name: leak_tracker
sha256:
cdd14e3836065a1f6302a236ec8b5f700695c803c57ae11a1c84df31e6bcf831
sha256:
"7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "10.0.
3
"
version: "10.0.
4
"
leak_tracker_flutter_testing:
leak_tracker_flutter_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_flutter_testing
name: leak_tracker_flutter_testing
sha256: "
9b2ef90589911d665277464e0482b209d39882dffaaf4ef69a3561a3354b2ebc
"
sha256: "
06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
2
"
version: "3.0.
3
"
leak_tracker_testing:
leak_tracker_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_testing
name: leak_tracker_testing
sha256:
fd3cd66cb2bcd7b50dcd3b413af49d78051f809c8b3f6e047962765c15a0d23d
sha256:
"6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
0
"
version: "3.0.
1
"
lints:
lints:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -127,10 +127,10 @@ packages:
...
@@ -127,10 +127,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
sha256:
d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256:
"7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.1
1
.0"
version: "1.1
2
.0"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment