Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • private-contact-logging/interface-utilisateur
1 result
Show changes
Commits on Source (2)
assets/VirusSansQR-v2.png

57.6 KiB

assets/VirusSansQR-v3.png

58.6 KiB

......@@ -128,8 +128,8 @@ class QR extends StatelessWidget {
return QrImage(
data: jsonEncode(_codeWrapperQR()),
version: QrVersions.auto,
size: MediaQuery.of(context).size.height * 0.25,
foregroundColor: Theme.of(context).primaryColorLight,
padding: EdgeInsets.all(0),
);
}
}
......@@ -67,7 +67,7 @@ class _QRDecoState extends State<QRDeco> with TickerProviderStateMixin {
),
// QR et titre de l'event prenant 80% de l'espace
Expanded(
flex: 8,
flex: 7,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.stretch,
......@@ -124,7 +124,7 @@ class _QRDecoState extends State<QRDeco> with TickerProviderStateMixin {
// Bouton
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.05),
top: MediaQuery.of(context).size.height * 0.1),
child: FlatButton(
onPressed: () {
setState(() {
......@@ -184,11 +184,25 @@ class _QRDecoState extends State<QRDeco> with TickerProviderStateMixin {
/// Méthode construisant le QR
Widget _buildQRScreen() {
return Container(
child: Center(child: QR.fromEvent(widget.event)),
child: Row(
children: [
Spacer(
flex: 2,
),
Expanded(
flex: 3,
child: Container(
child: QR.fromEvent(widget.event),
),
),
Spacer(
flex: 2,
),
],
),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("./assets/VirusSansQR.png"),
fit: BoxFit.contain,
image: AssetImage("./assets/VirusSansQR-v3.png"),
),
),
);
......@@ -301,7 +315,7 @@ class _QRDecoState extends State<QRDeco> with TickerProviderStateMixin {
_customSecondaryButton(
body: "Réessayer",
onPressed: _signalEvent,
widthPercentage: 0.5,
widthPercentage: 0.7,
),
],
),
......@@ -374,17 +388,17 @@ class _QRDecoState extends State<QRDeco> with TickerProviderStateMixin {
/// Méthode retournant une taille à utiliser pour fontSize selon le nombre de caractères
double _getSizeFromText(String text) {
if (text.length > 15) {
return 30;
return 25;
} else if (text.length > 10) {
return 40;
return 32;
} else {
return 50;
return 45;
}
}
/// Méthode retournant une chaîne de caractères plus courte si nécessaire
String _getShortenedText(String text) {
if (text.length > 15)
if (text.length > 20)
return text.substring(0, 15) + "...";
else
return text;
......