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
Select Git revision
  • 17-improve-app-metadata
  • master
  • Release_0.0.10_10
  • Release_0.0.11_11
  • Release_0.0.12_12
  • Release_0.0.1_1
  • Release_0.0.2_2
  • Release_0.0.3_3
  • Release_0.0.4_4
  • Release_0.0.5_5
  • Release_0.0.6_6
  • Release_0.0.7_7
  • Release_0.0.8_8
  • Release_0.1.0_13
  • Release_0.1.1_14
  • Release_0.2.0_15
  • Release_0.2.1_16
  • Release_0.3.0_17
  • Release_0.3.1_18
  • Release_0.4.0_19
  • Release_0.4.1_20
  • Release_0.4.2_21
  • Release_0.5.0_22
  • Release_0.6.0_23
  • Release_0.7.0_24
  • Release_0.8.0_25
  • Release_0.8.1_26
  • Release_0.8.2_27
  • Release_0.9.0_28
29 results

Target

Select target project
  • android/org.benoitharrault.tetrisdual
1 result
Select Git revision
  • 17-improve-app-metadata
  • master
  • Release_0.0.10_10
  • Release_0.0.11_11
  • Release_0.0.12_12
  • Release_0.0.1_1
  • Release_0.0.2_2
  • Release_0.0.3_3
  • Release_0.0.4_4
  • Release_0.0.5_5
  • Release_0.0.6_6
  • Release_0.0.7_7
  • Release_0.0.8_8
  • Release_0.1.0_13
  • Release_0.1.1_14
  • Release_0.2.0_15
  • Release_0.2.1_16
  • Release_0.3.0_17
  • Release_0.3.1_18
  • Release_0.4.0_19
  • Release_0.4.1_20
  • Release_0.4.2_21
  • Release_0.5.0_22
  • Release_0.6.0_23
  • Release_0.7.0_24
  • Release_0.8.0_25
  • Release_0.8.1_26
  • Release_0.8.2_27
  • Release_0.9.0_28
29 results
Show changes
Commits on Source (4)
Showing
with 394 additions and 344 deletions
include: package:flutter_lints/flutter.yaml
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
...@@ -14,11 +20,6 @@ if (gradlePropertiesFile.exists()) { ...@@ -14,11 +20,6 @@ if (gradlePropertiesFile.exists()) {
} }
} }
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def appVersionCode = gradleProperties.getProperty('app.versionCode') def appVersionCode = gradleProperties.getProperty('app.versionCode')
if (appVersionCode == null) { if (appVersionCode == null) {
appVersionCode = '1' appVersionCode = '1'
...@@ -29,9 +30,6 @@ if (appVersionName == null) { ...@@ -29,9 +30,6 @@ if (appVersionName == null) {
appVersionName = '1.0' appVersionName = '1.0'
} }
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) { if (keystorePropertiesFile.exists()) {
...@@ -44,7 +42,7 @@ android { ...@@ -44,7 +42,7 @@ android {
defaultConfig { defaultConfig {
applicationId "org.benoitharrault.tetrisdual" applicationId "org.benoitharrault.tetrisdual"
minSdkVersion 16 minSdkVersion flutter.minSdkVersion
targetSdkVersion 30 targetSdkVersion 30
versionCode appVersionCode.toInteger() versionCode appVersionCode.toInteger()
versionName appVersionName versionName appVersionName
......
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
}
}
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }
......
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.8 app.versionName=0.0.10
app.versionCode=8 app.versionCode=10
include ':app' pluginManagement {
def flutterSdkPath = {
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.2.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
}
include ":app"
Update flutter gradle plugin.
Add automatic flutter linter. Apply code lints. Update dependencies.
Mise à jour du plugin gradle pour flutter.
Ajout d'un correcteur automatique de code. Application des correction. Mise à jour des dépendances.
import 'dart:math'; import 'dart:math';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
class Counter { class Counter {
...@@ -10,56 +11,79 @@ class Counter { ...@@ -10,56 +11,79 @@ class Counter {
int _holes = 0; // Count non fillable holes caused by this new tetrimino int _holes = 0; // Count non fillable holes caused by this new tetrimino
// Points definitions // Points definitions
int _base = 50; static const int _base = 50;
int _pointsIfMatch = 50; static const int _pointsIfMatch = 50;
int _pointsPerLine = 60; static const int _pointsPerLine = 60;
int _pointsPerHole = -10; static const int _pointsPerHole = -10;
Color categoryIconColor = Colors.green; static const double iconSize = 30.0;
Color buttonIconColor = Colors.blue; static const double fontSize = 50.0;
double iconSize = 30.0; static const double spacerHeight = 7;
TableRow spacer() { // Counter categories icons
double height = 7; static const Color categoryIconColor = Colors.green;
return TableRow(children: [ static const Icon iconTouchingColor = Icon(
SizedBox(height: height), Icons.join_full,
SizedBox(height: height), color: categoryIconColor,
SizedBox(height: height), size: iconSize,
SizedBox(height: height) );
]); static const Icon iconRowsCount = Icon(
} Icons.table_rows,
color: categoryIconColor,
size: iconSize,
);
static const Icon iconHolesCount = Icon(
Icons.check_box_outline_blank,
color: categoryIconColor,
size: iconSize,
);
// Action buttons icons
static const Color buttonIconColor = Colors.blue;
static const Icon iconRemove = Icon(
Icons.remove,
color: buttonIconColor,
size: iconSize,
);
static const Icon iconAdd = Icon(
Icons.add,
color: buttonIconColor,
size: iconSize,
);
Widget buildCounterWidget(Data myProvider) { Widget buildCounterWidget(Data myProvider) {
return Container( return Table(
child: Table(
children: [ children: [
buildMatchWidget(myProvider), buildMatchWidget(myProvider),
spacer(), buildSpacerRow(),
buildLinesWidget(myProvider), buildLinesWidget(myProvider),
spacer(), buildSpacerRow(),
buildHolesWidget(myProvider), buildHolesWidget(myProvider),
spacer(), buildSpacerRow(),
], ],
),
); );
} }
TableRow buildSpacerRow() {
return const TableRow(children: [
SizedBox(height: spacerHeight),
SizedBox(height: spacerHeight),
SizedBox(height: spacerHeight),
SizedBox(height: spacerHeight)
]);
}
TableRow buildMatchWidget(Data myProvider) { TableRow buildMatchWidget(Data myProvider) {
return TableRow( return TableRow(
children: [ children: [
Icon( iconTouchingColor,
Icons.join_full,
color: categoryIconColor,
size: iconSize,
),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.remove, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconRemove,
onPressed: () { onPressed: () {
_match = false; _match = false;
myProvider.redraw(); myProvider.redraw();
...@@ -74,12 +98,11 @@ class Counter { ...@@ -74,12 +98,11 @@ class Counter {
), ),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.add, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconAdd,
onPressed: () { onPressed: () {
_match = true; _match = true;
myProvider.redraw(); myProvider.redraw();
...@@ -92,19 +115,14 @@ class Counter { ...@@ -92,19 +115,14 @@ class Counter {
TableRow buildLinesWidget(Data myProvider) { TableRow buildLinesWidget(Data myProvider) {
return TableRow( return TableRow(
children: [ children: [
Icon( iconRowsCount,
Icons.table_rows,
color: categoryIconColor,
size: iconSize,
),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.remove, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconRemove,
onPressed: () { onPressed: () {
_lines = max(_lines - 1, 0); _lines = max(_lines - 1, 0);
myProvider.redraw(); myProvider.redraw();
...@@ -113,20 +131,23 @@ class Counter { ...@@ -113,20 +131,23 @@ class Counter {
Center( Center(
child: Text( child: Text(
_lines.toString(), _lines.toString(),
style: TextStyle( style: const TextStyle(
fontFamily: 'Blocks', fontFamily: 'Blocks',
fontSize: 50, fontSize: fontSize,
),
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
), ),
), ),
), ),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.add, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconAdd,
onPressed: () { onPressed: () {
_lines = min(_lines + 1, 4); _lines = min(_lines + 1, 4);
myProvider.redraw(); myProvider.redraw();
...@@ -139,19 +160,14 @@ class Counter { ...@@ -139,19 +160,14 @@ class Counter {
TableRow buildHolesWidget(Data myProvider) { TableRow buildHolesWidget(Data myProvider) {
return TableRow( return TableRow(
children: [ children: [
Icon( iconHolesCount,
Icons.check_box_outline_blank,
color: categoryIconColor,
size: iconSize,
),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.remove, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconRemove,
onPressed: () { onPressed: () {
_holes = max(_holes - 1, 0); _holes = max(_holes - 1, 0);
myProvider.redraw(); myProvider.redraw();
...@@ -160,22 +176,25 @@ class Counter { ...@@ -160,22 +176,25 @@ class Counter {
Center( Center(
child: Text( child: Text(
_holes.toString(), _holes.toString(),
style: TextStyle( style: const TextStyle(
fontFamily: 'Blocks', fontFamily: 'Blocks',
fontSize: 50, fontSize: fontSize,
),
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
), ),
), ),
), ),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.add, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: buttonIconColor,
size: iconSize,
), ),
icon: iconAdd,
onPressed: () { onPressed: () {
_holes = min(_holes + 1, 4); _holes = min(_holes + 1, 9);
myProvider.redraw(); myProvider.redraw();
}, },
), ),
......
import 'dart:math'; import 'dart:math';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tetrisdual/entity/counter.dart'; import 'package:tetrisdual/entity/counter.dart';
import 'package:tetrisdual/layout/board_painter.dart'; import 'package:tetrisdual/layout/board_painter.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
...@@ -11,18 +12,16 @@ class Player { ...@@ -11,18 +12,16 @@ class Player {
int _score = 0; int _score = 0;
int _currentTetrimino = 0; int _currentTetrimino = 0;
Counter _counter = new Counter(); final Counter _counter = Counter();
Widget buildTetriminoWidget(Data myProvider, double width) { Widget buildTetriminoWidget(Data myProvider, double width) {
return Container( return GestureDetector(
child: GestureDetector(
onTapUp: (details) { onTapUp: (details) {
if (playerId == myProvider.getCurrentPlayer().playerId) { if (playerId == myProvider.getCurrentPlayer().playerId) {
pickRandomTetrimino(); pickRandomTetrimino();
myProvider.redraw(); myProvider.redraw();
} }
}, },
child: Container(
child: CustomPaint( child: CustomPaint(
size: Size(width, width), size: Size(width, width),
willChange: false, willChange: false,
...@@ -30,87 +29,91 @@ class Player { ...@@ -30,87 +29,91 @@ class Player {
isComplex: true, isComplex: true,
key: Key(_currentTetrimino.toString()), key: Key(_currentTetrimino.toString()),
), ),
),
),
); );
} }
Widget buildManagerWidget(Data myProvider) { Widget buildManagerWidget(Data myProvider) {
List<Widget> items = [];
if (myProvider.currentPlayer == playerId) {
items.add(_counter.buildCounterWidget(myProvider));
items.add(buildSubmitWidget(myProvider));
}
return Expanded( return Expanded(
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: const EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: items, children: myProvider.currentPlayer == playerId
? [
_counter.buildCounterWidget(myProvider),
buildSubmitWidget(myProvider),
]
: [],
), ),
), ),
); );
} }
Widget buildSubmitWidget(Data myProvider) { Widget buildSubmitWidget(Data myProvider) {
double fontSize = 70; const double gainFontSize = 70;
return Container( const gainTestStyle = TextStyle(
decoration: BoxDecoration( fontFamily: 'Blocks',
fontSize: gainFontSize,
fontWeight: FontWeight.bold,
);
const submitIcon = Icon(
Icons.done_all,
color: Colors.orange,
size: gainFontSize / 2,
);
const topBorderBlack = BoxDecoration(
border: Border( border: Border(
top: BorderSide( top: BorderSide(
color: Colors.black, color: Colors.black,
width: 2, width: 2,
), ),
), ),
), );
padding: EdgeInsets.only(
top: 5, return Container(
decoration: topBorderBlack,
padding: const EdgeInsets.only(
top: 10,
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
'+' + _counter.computePoints().toString(), '+${_counter.computePoints()}',
style: TextStyle( style: gainTestStyle,
fontFamily: 'Blocks', textHeightBehavior: const TextHeightBehavior(
fontSize: fontSize, applyHeightToFirstAscent: false,
fontWeight: FontWeight.bold, applyHeightToLastDescent: false,
), ),
), ),
SizedBox( const SizedBox(width: 10),
width: 10,
),
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: const BoxConstraints(),
icon: Icon( style: const ButtonStyle(
Icons.done_all, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: Colors.orange,
size: fontSize / 2.5,
), ),
icon: submitIcon,
onPressed: () { onPressed: () {
_score = _score + _counter.computePoints(); _score = _score + _counter.computePoints();
_counter.reset(); _counter.reset();
myProvider.toggleCurrentPlayer(); myProvider.toggleCurrentPlayer();
}, },
), ),
SizedBox( const SizedBox(width: 10),
width: 10,
),
], ],
), ),
); );
} }
Widget buildPlayerBoard(Data myProvider, double screenWidth, bool isActive) { Widget buildPlayerBoard(Data myProvider, double screenWidth, bool isActive) {
double tetriminoBlockWidth = screenWidth / 2.3; final double tetriminoBlockWidth = screenWidth / 2.3;
Color borderColor = isActive ? Colors.greenAccent : Colors.blueGrey; final Color borderColor = isActive ? Colors.greenAccent : Colors.blueGrey;
double borderWidth = 10; const double borderWidth = 10;
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
...@@ -118,11 +121,15 @@ class Player { ...@@ -118,11 +121,15 @@ class Player {
children: [ children: [
Text( Text(
_score.toString(), _score.toString(),
style: TextStyle( style: const TextStyle(
fontFamily: 'Blocks', fontFamily: 'Blocks',
fontSize: 130, fontSize: 130,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
),
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -132,8 +139,8 @@ class Player { ...@@ -132,8 +139,8 @@ class Player {
), ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
isActive isActive
? buildTetriminoWidget(myProvider, tetriminoBlockWidth) ? buildTetriminoWidget(myProvider, tetriminoBlockWidth)
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
class Board { class Board {
static Container buildGameBoard(Data myProvider, double screenWidth) { static Widget buildGameBoard(Data myProvider, double screenWidth) {
Widget player1 = new RotatedBox( final Widget player1 = RotatedBox(
quarterTurns: 2, quarterTurns: 2,
child: myProvider child: myProvider
.getPlayer(1) .getPlayer(1)
.buildPlayerBoard(myProvider, screenWidth, myProvider.currentPlayer == 1), .buildPlayerBoard(myProvider, screenWidth, myProvider.currentPlayer == 1),
); );
Widget player2 = myProvider
final Widget player2 = myProvider
.getPlayer(2) .getPlayer(2)
.buildPlayerBoard(myProvider, screenWidth, myProvider.currentPlayer == 2); .buildPlayerBoard(myProvider, screenWidth, myProvider.currentPlayer == 2);
Widget togglePlayerWidget = GestureDetector( final Widget togglePlayerWidget = GestureDetector(
onTapUp: (details) { onTapUp: (details) {
myProvider.toggleCurrentPlayer(); myProvider.toggleCurrentPlayer();
}, },
child: Text( child: const Text(
'🔄', '🔄',
style: TextStyle( style: TextStyle(
fontSize: 50, fontSize: 50,
), ),
textHeightBehavior: TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
),
), ),
); );
return Container( return Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
......
...@@ -7,10 +7,15 @@ class BoardPainter extends CustomPainter { ...@@ -7,10 +7,15 @@ class BoardPainter extends CustomPainter {
final int currentTetrimino; final int currentTetrimino;
void drawPixels(List<List<int>> pixels, Canvas canvas, double drawSize, Color pixelColor) { void drawPixels(
List<List<int>> pixels,
Canvas canvas,
double drawSize,
Color pixelColor,
) {
int blockWidth = 1; int blockWidth = 1;
int blockHeight = 1; int blockHeight = 1;
pixels.forEach((pixel) { for (List<int> pixel in pixels) {
int x = pixel[0] + 1; int x = pixel[0] + 1;
int y = pixel[1] + 1; int y = pixel[1] + 1;
if (x > blockWidth) { if (x > blockWidth) {
...@@ -19,52 +24,53 @@ class BoardPainter extends CustomPainter { ...@@ -19,52 +24,53 @@ class BoardPainter extends CustomPainter {
if (y > blockHeight) { if (y > blockHeight) {
blockHeight = y; blockHeight = y;
} }
}); }
double pixelSize = drawSize / (max(blockWidth, blockHeight) + 2); final double pixelSize = drawSize / (max(blockWidth, blockHeight) + 2);
double xOffset = final double xOffset =
(blockHeight > blockWidth) ? (blockHeight - blockWidth) * pixelSize / 2 : 0; (blockHeight > blockWidth) ? (blockHeight - blockWidth) * pixelSize / 2 : 0;
double yOffset = final double yOffset =
(blockWidth > blockHeight) ? (blockWidth - blockHeight) * pixelSize / 2 : 0; (blockWidth > blockHeight) ? (blockWidth - blockHeight) * pixelSize / 2 : 0;
// Fill background // Fill background
final paintPixelBackground = Paint(); final paintPixelBackground = Paint();
paintPixelBackground.color = pixelColor; paintPixelBackground.color = pixelColor;
paintPixelBackground.style = PaintingStyle.fill; paintPixelBackground.style = PaintingStyle.fill;
pixels.forEach((pixel) { for (List<int> pixel in pixels) {
int x = pixel[0]; final int x = pixel[0];
int y = pixel[1]; final int y = pixel[1];
final Rect pixelBackground = Rect.fromPoints( final Rect pixelBackground = Rect.fromPoints(
Offset(xOffset + pixelSize * (x + 1), yOffset + pixelSize * (y + 1)), Offset(xOffset + pixelSize * (x + 1), yOffset + pixelSize * (y + 1)),
Offset(xOffset + pixelSize * (x + 2), yOffset + pixelSize * (y + 2))); Offset(xOffset + pixelSize * (x + 2), yOffset + pixelSize * (y + 2)));
canvas.drawRect(pixelBackground, paintPixelBackground); canvas.drawRect(pixelBackground, paintPixelBackground);
}); }
// Border lines // Border lines
final paintPixelBorder = Paint(); final paintPixelBorder = Paint();
paintPixelBorder.color = Colors.grey.shade200; paintPixelBorder.color = Colors.grey.shade200;
paintPixelBorder.style = PaintingStyle.stroke; paintPixelBorder.style = PaintingStyle.stroke;
paintPixelBorder.strokeWidth = 4; paintPixelBorder.strokeWidth = 4;
pixels.forEach((pixel) { for (List<int> pixel in pixels) {
int x = pixel[0]; final int x = pixel[0];
int y = pixel[1]; final int y = pixel[1];
final Rect rectBackground = Rect.fromPoints( final Rect rectBackground = Rect.fromPoints(
Offset(xOffset + pixelSize * (x + 1), yOffset + pixelSize * (y + 1)), Offset(xOffset + pixelSize * (x + 1), yOffset + pixelSize * (y + 1)),
Offset(xOffset + pixelSize * (x + 2), yOffset + pixelSize * (y + 2))); Offset(xOffset + pixelSize * (x + 2), yOffset + pixelSize * (y + 2)));
canvas.drawRect(rectBackground, paintPixelBorder); canvas.drawRect(rectBackground, paintPixelBorder);
}); }
} }
@override @override
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
double drawSize = min(size.width, size.height); final double drawSize = min(size.width, size.height);
// Fill background // Fill background
final paintBackground = Paint(); final paintBackground = Paint();
paintBackground.color = Colors.grey.shade800; paintBackground.color = Colors.grey.shade800;
paintBackground.style = PaintingStyle.fill; paintBackground.style = PaintingStyle.fill;
final Rect rectBackground = Rect.fromPoints(Offset(0, 0), Offset(drawSize, drawSize)); final Rect rectBackground =
Rect.fromPoints(const Offset(0, 0), Offset(drawSize, drawSize));
canvas.drawRect(rectBackground, paintBackground); canvas.drawRect(rectBackground, paintBackground);
// Add tetrimino // Add tetrimino
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tetrisdual/layout/board.dart'; import 'package:tetrisdual/layout/board.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
import 'package:tetrisdual/utils/game_utils.dart'; import 'package:tetrisdual/utils/game_utils.dart';
class Game { class Game {
static Container buildGameWidget(Data myProvider, double screenWidth) { static Widget buildGameWidget(Data myProvider, double screenWidth) {
return Container( return !myProvider.isGameFinished
child: !myProvider.isGameFinished
? Board.buildGameBoard(myProvider, screenWidth) ? Board.buildGameBoard(myProvider, screenWidth)
: Game.buildEndGameMessage(myProvider), : Game.buildEndGameMessage(myProvider);
);
} }
static TextButton buildQuitGameButton(Data myProvider) { static TextButton buildQuitGameButton(Data myProvider) {
return TextButton( return TextButton(
child: Image( child: const Image(
image: AssetImage('assets/icons/button_back.png'), image: AssetImage('assets/icons/button_back.png'),
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
...@@ -23,21 +22,21 @@ class Game { ...@@ -23,21 +22,21 @@ class Game {
} }
static Container buildEndGameMessage(Data myProvider) { static Container buildEndGameMessage(Data myProvider) {
String decorationImageAssetName = 'assets/icons/game_fail.png'; const String decorationImageAssetName = 'assets/icons/game_fail.png';
Widget decorationWidget = TextButton( final Widget decorationWidget = TextButton(
child: Image( child: const Image(
image: AssetImage(decorationImageAssetName), image: AssetImage(decorationImageAssetName),
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
onPressed: () => null, onPressed: () {},
); );
return Container( return Container(
margin: EdgeInsets.all(2), margin: const EdgeInsets.all(2),
padding: EdgeInsets.all(2), padding: const EdgeInsets.all(2),
child: Table( child: Table(
defaultColumnWidth: IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: [ children: [
TableRow( TableRow(
children: [ children: [
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
import 'package:tetrisdual/utils/game_utils.dart'; import 'package:tetrisdual/utils/game_utils.dart';
class Parameters { class Parameters {
static double separatorHeight = 2.0; static const double separatorHeight = 2.0;
static double blockMargin = 3.0; static const double blockMargin = 3.0;
static double blockPadding = 2.0; static const double blockPadding = 2.0;
static Color buttonBackgroundColor = Colors.white; static const Color buttonBackgroundColor = Colors.white;
static Color buttonBorderColorActive = Colors.blue; static const Color buttonBorderColorActive = Colors.blue;
static Color buttonBorderColorInactive = Colors.white; static const Color buttonBorderColorInactive = Colors.white;
static double buttonBorderWidth = 10.0; static const double buttonBorderWidth = 10.0;
static double buttonBorderRadius = 8.0; static const double buttonBorderRadius = 8.0;
static double buttonPadding = 0.0; static const double buttonPadding = 0.0;
static double buttonMargin = 0.0; static const double buttonMargin = 0.0;
static Container buildParametersSelector(Data myProvider) { static Widget buildParametersSelector(Data myProvider) {
List<Widget> lines = []; final List<Widget> lines = [];
List parameters = myProvider.availableParameters; final List<String> parameters = myProvider.availableParameters;
for (var index = 0; index < parameters.length; index++) { for (int index = 0; index < parameters.length; index++) {
lines.add(buildParameterSelector(myProvider, parameters[index])); lines.add(buildParameterSelector(myProvider, parameters[index]));
lines.add(SizedBox(height: separatorHeight)); lines.add(const SizedBox(height: separatorHeight));
} }
Widget buttonsBlock = buildStartNewGameButton(myProvider); final Widget buttonsBlock = buildStartNewGameButton(myProvider);
return Container( return Column(
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: separatorHeight), const SizedBox(height: separatorHeight),
Expanded( Expanded(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
...@@ -38,18 +38,17 @@ class Parameters { ...@@ -38,18 +38,17 @@ class Parameters {
children: lines, children: lines,
), ),
), ),
SizedBox(height: separatorHeight), const SizedBox(height: separatorHeight),
Container( Container(
child: buttonsBlock, child: buttonsBlock,
), ),
], ],
),
); );
} }
static Image buildImageWidget(String imageAssetCode) { static Image buildImageWidget(String imageAssetCode) {
return Image( return Image(
image: AssetImage('assets/icons/' + imageAssetCode + '.png'), image: AssetImage('assets/icons/$imageAssetCode.png'),
fit: BoxFit.fill, fit: BoxFit.fill,
); );
} }
...@@ -65,7 +64,7 @@ class Parameters { ...@@ -65,7 +64,7 @@ class Parameters {
children: [ children: [
TextButton( TextButton(
child: buildImageContainerWidget('placeholder'), child: buildImageContainerWidget('placeholder'),
onPressed: () => null, onPressed: () {},
), ),
], ],
); );
...@@ -73,10 +72,10 @@ class Parameters { ...@@ -73,10 +72,10 @@ class Parameters {
static Container buildStartNewGameButton(Data myProvider) { static Container buildStartNewGameButton(Data myProvider) {
return Container( return Container(
margin: EdgeInsets.all(blockMargin), margin: const EdgeInsets.all(blockMargin),
padding: EdgeInsets.all(blockPadding), padding: const EdgeInsets.all(blockPadding),
child: Table( child: Table(
defaultColumnWidth: IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: [ children: [
TableRow( TableRow(
children: [ children: [
...@@ -98,18 +97,18 @@ class Parameters { ...@@ -98,18 +97,18 @@ class Parameters {
} }
static Widget buildParameterSelector(Data myProvider, String parameterCode) { static Widget buildParameterSelector(Data myProvider, String parameterCode) {
List availableValues = myProvider.getParameterAvailableValues(parameterCode); final List<String> availableValues = myProvider.getParameterAvailableValues(parameterCode);
if (availableValues.length == 1) { if (availableValues.length == 1) {
return SizedBox(height: 0.0); return const SizedBox(height: 0.0);
} }
return Table( return Table(
defaultColumnWidth: IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: [ children: [
TableRow( TableRow(
children: [ children: [
for (var index = 0; index < availableValues.length; index++) for (int index = 0; index < availableValues.length; index++)
Column( Column(
children: [ children: [
_buildParameterButton(myProvider, parameterCode, availableValues[index]) _buildParameterButton(myProvider, parameterCode, availableValues[index])
...@@ -122,16 +121,19 @@ class Parameters { ...@@ -122,16 +121,19 @@ class Parameters {
} }
static Widget _buildParameterButton( static Widget _buildParameterButton(
Data myProvider, String parameterCode, String parameterValue) { Data myProvider,
String currentValue = myProvider.getParameterValue(parameterCode).toString(); String parameterCode,
String parameterValue,
) {
final String currentValue = myProvider.getParameterValue(parameterCode).toString();
bool isActive = (parameterValue == currentValue); final bool isActive = (parameterValue == currentValue);
String imageAsset = parameterCode + '_' + parameterValue; final String imageAsset = '${parameterCode}_$parameterValue';
return TextButton( return TextButton(
child: Container( child: Container(
margin: EdgeInsets.all(buttonMargin), margin: const EdgeInsets.all(buttonMargin),
padding: EdgeInsets.all(buttonPadding), padding: const EdgeInsets.all(buttonPadding),
decoration: BoxDecoration( decoration: BoxDecoration(
color: buttonBackgroundColor, color: buttonBackgroundColor,
borderRadius: BorderRadius.circular(buttonBorderRadius), borderRadius: BorderRadius.circular(buttonBorderRadius),
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:tetrisdual/provider/data.dart';
import 'package:tetrisdual/screens/home.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:overlay_support/overlay_support.dart'; import 'package:overlay_support/overlay_support.dart';
import 'package:tetrisdual/provider/data.dart';
import 'package:tetrisdual/screens/home.dart';
void main() { void main() {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
.then((value) => runApp(MyApp())); .then((value) => runApp(const MyApp()));
} }
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ChangeNotifierProvider( return ChangeNotifierProvider(
...@@ -19,14 +22,13 @@ class MyApp extends StatelessWidget { ...@@ -19,14 +22,13 @@ class MyApp extends StatelessWidget {
child: Consumer<Data>(builder: (context, data, child) { child: Consumer<Data>(builder: (context, data, child) {
return OverlaySupport( return OverlaySupport(
child: MaterialApp( child: MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData( theme: ThemeData(
primaryColor: Colors.blue, primaryColor: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
), ),
home: Home(), home: const Home(),
routes: { routes: {
Home.id: (context) => Home(), Home.id: (context) => const Home(),
}, },
), ),
); );
......
...@@ -2,32 +2,30 @@ import 'dart:math'; ...@@ -2,32 +2,30 @@ import 'dart:math';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:tetrisdual/entity/player.dart'; import 'package:tetrisdual/entity/player.dart';
class Data extends ChangeNotifier { class Data extends ChangeNotifier {
// Configuration available parameters // Configuration available parameters
List _availableParameters = []; final List<String> _availableParameters = [];
List get availableParameters => _availableParameters; List<String> get availableParameters => _availableParameters;
// Application default configuration // Application default configuration
// Application current configuration // Application current configuration
String getParameterValue(String parameterCode) { String getParameterValue(String parameterCode) {
switch (parameterCode) { switch (parameterCode) {}
}
return ''; return '';
} }
List getParameterAvailableValues(String parameterCode) { List<String> getParameterAvailableValues(String parameterCode) {
switch (parameterCode) { switch (parameterCode) {}
}
return []; return [];
} }
void setParameterValue(String parameterCode, String parameterValue) async { void setParameterValue(String parameterCode, String parameterValue) async {
switch (parameterCode) { switch (parameterCode) {}
}
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
prefs.setString(parameterCode, parameterValue); prefs.setString(parameterCode, parameterValue);
} }
...@@ -75,12 +73,12 @@ class Data extends ChangeNotifier { ...@@ -75,12 +73,12 @@ class Data extends ChangeNotifier {
} }
Player getPlayer(int playerId) { Player getPlayer(int playerId) {
int playerIndex = playerId - 1; final int playerIndex = playerId - 1;
Player? player = _players[playerIndex]; Player? player = _players[playerIndex];
// Create new player if none // Create new player if none
if (null == player) { if (null == player) {
player = new Player(playerId); player = Player(playerId);
_players[playerIndex] = player; _players[playerIndex] = player;
} }
...@@ -98,7 +96,7 @@ class Data extends ChangeNotifier { ...@@ -98,7 +96,7 @@ class Data extends ChangeNotifier {
void resetGame() { void resetGame() {
_gameIsRunning = false; _gameIsRunning = false;
_gameIsFinished = false; _gameIsFinished = false;
_players = [new Player(1), new Player(2)]; _players = [Player(1), Player(2)];
notifyListeners(); notifyListeners();
} }
} }
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:overlay_support/overlay_support.dart';
import 'package:tetrisdual/layout/game.dart'; import 'package:tetrisdual/layout/game.dart';
import 'package:tetrisdual/layout/parameters.dart'; import 'package:tetrisdual/layout/parameters.dart';
import 'package:tetrisdual/provider/data.dart'; import 'package:tetrisdual/provider/data.dart';
import 'package:tetrisdual/utils/game_utils.dart'; import 'package:tetrisdual/utils/game_utils.dart';
import 'package:provider/provider.dart';
import 'package:overlay_support/overlay_support.dart';
class Home extends StatefulWidget { class Home extends StatefulWidget {
const Home({super.key});
static const String id = 'home'; static const String id = 'home';
@override @override
_HomeState createState() => _HomeState(); HomeState createState() => HomeState();
} }
class _HomeState extends State<Home> { class HomeState extends State<Home> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
...@@ -21,42 +24,29 @@ class _HomeState extends State<Home> { ...@@ -21,42 +24,29 @@ class _HomeState extends State<Home> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Data myProvider = Provider.of<Data>(context); final Data myProvider = Provider.of<Data>(context);
double screenWidth = MediaQuery.of(context).size.width; final double screenWidth = MediaQuery.of(context).size.width;
List<Widget> menuActions = []; final List<Widget> menuActions = [];
if (myProvider.isGameRunning) { if (myProvider.isGameRunning) {
menuActions = [ menuActions.add(TextButton(
TextButton( child: const Image(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: Colors.blue,
width: 4,
),
),
child: Image(
image: AssetImage('assets/icons/button_back.png'), image: AssetImage('assets/icons/button_back.png'),
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
),
onPressed: () => toast('Long press to quit game...'), onPressed: () => toast('Long press to quit game...'),
onLongPress: () => GameUtils.quitGame(myProvider), onLongPress: () => GameUtils.quitGame(myProvider),
), ));
];
} }
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
actions: menuActions, actions: menuActions,
), ),
body: SafeArea( body: myProvider.isGameRunning
child: myProvider.isGameRunning
? Game.buildGameWidget(myProvider, screenWidth) ? Game.buildGameWidget(myProvider, screenWidth)
: Parameters.buildParametersSelector(myProvider), : Parameters.buildParametersSelector(myProvider),
),
); );
} }
} }
...@@ -6,8 +6,6 @@ class GameUtils { ...@@ -6,8 +6,6 @@ class GameUtils {
} }
static Future<void> startNewGame(Data myProvider) async { static Future<void> startNewGame(Data myProvider) async {
print('Starting game');
myProvider.resetGame(); myProvider.resetGame();
myProvider.enableRandomPlayer(); myProvider.enableRandomPlayer();
myProvider.getCurrentPlayer().pickRandomTetrimino(); myProvider.getCurrentPlayer().pickRandomTetrimino();
......
...@@ -21,52 +21,68 @@ packages: ...@@ -21,52 +21,68 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
name: ffi name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "2.1.2"
file: file:
dependency: transitive dependency: transitive
description: description:
name: file name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.4" version: "7.0.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
url: "https://pub.dev"
source: hosted
version: "3.0.1"
flutter_web_plugins: flutter_web_plugins:
dependency: transitive dependency: transitive
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
lints:
dependency: transitive
description:
name: lints
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "3.0.0"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
nested: nested:
dependency: transitive dependency: transitive
description: description:
...@@ -87,10 +103,10 @@ packages: ...@@ -87,10 +103,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
...@@ -103,10 +119,10 @@ packages: ...@@ -103,10 +119,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path_provider_platform_interface name: path_provider_platform_interface
sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
path_provider_windows: path_provider_windows:
dependency: transitive dependency: transitive
description: description:
...@@ -119,34 +135,34 @@ packages: ...@@ -119,34 +135,34 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.2" version: "3.1.4"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.6" version: "2.1.8"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description:
name: provider name: provider
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.5" version: "6.1.1"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
name: shared_preferences name: shared_preferences
sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.2.2"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
...@@ -159,42 +175,42 @@ packages: ...@@ -159,42 +175,42 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_foundation name: shared_preferences_foundation
sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.4" version: "2.3.5"
shared_preferences_linux: shared_preferences_linux:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_linux name: shared_preferences_linux
sha256: c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
shared_preferences_platform_interface: shared_preferences_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_platform_interface name: shared_preferences_platform_interface
sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
shared_preferences_web: shared_preferences_web:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_web name: shared_preferences_web
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.3.0"
shared_preferences_windows: shared_preferences_windows:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_windows name: shared_preferences_windows
sha256: f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
...@@ -212,26 +228,26 @@ packages: ...@@ -212,26 +228,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.5.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.9" version: "5.2.0"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
name: xdg_directories name: xdg_directories
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.3" version: "1.0.4"
sdks: sdks:
dart: ">=3.1.0-185.0.dev <4.0.0" dart: ">=3.3.0 <4.0.0"
flutter: ">=3.7.0" flutter: ">=3.19.0"