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
62667a66
Commit
62667a66
authored
Feb 15, 2024
by
Timothé KOBAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
?
parent
0c7efbee
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
73 deletions
+111
-73
NOTICES
tp2/build/flutter_assets/NOTICES
+1
-61
exo4.dart
tp2/lib/exo4.dart
+1
-1
exo5.dart
tp2/lib/exo5.dart
+93
-0
main.dart
tp2/lib/main.dart
+8
-3
pubspec.lock
tp2/pubspec.lock
+8
-8
No files found.
tp2/build/flutter_assets/NOTICES
View file @
62667a66
...
...
@@ -5178,66 +5178,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
dart
Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
dart
Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
dart
Copyright 2012, the Dart project authors.
Redistribution and use in source and binary forms, with or without
...
...
@@ -6669,7 +6609,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/
c64c3d6bae2f51717fa10414ba8c3a8d7718a4e2
You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/
5a5d4c2622007c10ed6adcd5787eb3a69dd8ada4
/third_party/fallback_root_certificates/
--------------------------------------------------------------------------------
tp2/lib/exo
3
.dart
→
tp2/lib/exo
4
.dart
View file @
62667a66
...
...
@@ -26,7 +26,7 @@ class Tile {
Tile
tile
=
new
Tile
(
imageURL:
'https://picsum.photos/512'
,
alignment:
Alignment
(
0
,
0
));
class
Exo
3
extends
StatelessWidget
{
class
Exo
4
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
...
...
tp2/lib/exo5.dart
0 → 100644
View file @
62667a66
import
'package:flutter/material.dart'
;
class
Tile
{
Image
image
;
Alignment
alignment
;
Tile
({
required
this
.
image
,
required
this
.
alignment
});
Widget
croppedImageTile
(
double
widthFactor
)
{
print
(
"creating single tile"
);
return
FittedBox
(
fit:
BoxFit
.
fill
,
child:
ClipRect
(
child:
Container
(
child:
Align
(
alignment:
this
.
alignment
,
widthFactor:
widthFactor
,
heightFactor:
widthFactor
,
child:
image
,
),
),
),
);
}
}
class
Exo5
extends
StatefulWidget
{
const
Exo5
({
super
.
key
});
@override
State
<
Exo5
>
createState
()
=>
_Exo5
();
}
class
_Exo5
extends
State
<
Exo5
>
{
final
image
=
Image
.
network
(
'https://picsum.photos/512'
);
double
?
size
=
300
;
int
colNb
=
3
;
@override
Widget
build
(
BuildContext
context
)
{
print
(
"building state"
);
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Display a Tile as a Cropped Image'
),
centerTitle:
true
,
),
body:
Column
(
children:
[
Text
(
"col"
),
Container
(
margin:
const
EdgeInsets
.
all
(
20.0
),
child:
GridView
.
count
(
primary:
false
,
padding:
const
EdgeInsets
.
all
(
1
),
crossAxisSpacing:
1
,
mainAxisSpacing:
1
,
crossAxisCount:
colNb
,
// Nombre de colonnes
children:
[
Text
(
"aaaa"
),
Text
(
"bbb"
),
Text
(
"ccc"
)]
// createTilesFromImage(colNb)
)),
],
))
;
}
List
<
Widget
>
createTilesFromImage
(
int
colNb
)
{
print
(
"creating tiles"
);
Tile
tile
;
List
<
Widget
>
res
=
<
Widget
>[];
for
(
int
i
=
0
;
i
<
colNb
;
i
++){
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
()));
res
.
add
(
InkWell
(
child:
tile
.
croppedImageTile
(
1
/
colNb
),
onTap:
()
{
print
(
"tapped on tile
$i
$j
"
);
},
));
}
}
print
(
"finished creating tiles"
);
print
(
res
);
return
res
;
}
}
tp2/lib/main.dart
View file @
62667a66
import
'package:flutter/material.dart'
;
import
'package:tp2/exo1.dart'
;
import
'package:tp2/exo2.dart'
;
import
'package:tp2/exo3.dart'
;
import
'package:tp2/exo4.dart'
;
import
'package:tp2/exo5.dart'
;
class
Exos
{
...
...
@@ -30,9 +31,13 @@ void main() {
Exo2
()
),
Exos
(
'Exercice
3
'
,
'Exercice
4
'
,
'desc'
,
Exo3
()
Exo4
()
),
Exos
(
'Exercice 5'
,
'aaaaa'
,
Exo5
()
)
// Next exo
],
...
...
tp2/pubspec.lock
View file @
62667a66
...
...
@@ -79,26 +79,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
"7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256:
cdd14e3836065a1f6302a236ec8b5f700695c803c57ae11a1c84df31e6bcf831
url: "https://pub.dev"
source: hosted
version: "10.0.
4
"
version: "10.0.
3
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "
06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8
"
sha256: "
9b2ef90589911d665277464e0482b209d39882dffaaf4ef69a3561a3354b2ebc
"
url: "https://pub.dev"
source: hosted
version: "3.0.
3
"
version: "3.0.
2
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256:
"6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256:
fd3cd66cb2bcd7b50dcd3b413af49d78051f809c8b3f6e047962765c15a0d23d
url: "https://pub.dev"
source: hosted
version: "3.0.
1
"
version: "3.0.
0
"
lints:
dependency: transitive
description:
...
...
@@ -127,10 +127,10 @@ packages:
dependency: transitive
description:
name: meta
sha256:
"7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256:
d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.1
2
.0"
version: "1.1
1
.0"
path:
dependency: transitive
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