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