Skip to content
Snippets Groups Projects
Commit 117f6dfa authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '70-fix-improve-styled-container-widget' into 'master'

Resolve "Fix / improve styled container widget"

Closes #70

See merge request !68
parents 74f9ef9b 08990aaa
Branches
Tags Release_1.0.55_56
1 merge request!68Resolve "Fix / improve styled container widget"
Pipeline #6027 passed
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=1.0.54
app.versionCode=55
app.versionName=1.0.55
app.versionCode=56
......@@ -22,38 +22,32 @@ class DemoPage extends StatelessWidget {
const SizedBox(height: 8),
const AppHeader(text: 'TOP'),
const SizedBox(height: 20),
persistedCounterBlock(BlocProvider.of<DataCubit>(context)),
const SizedBox(height: 20),
testBlocConsumer(),
testBlocBuilder(),
const SizedBox(height: 20),
fakeApiCall(),
const SizedBox(height: 20),
const AppHeader(text: 'BOTTOM'),
const StyledWidget(
child: SizedBox.square(
dimension: 40,
child: Center(child: Text('default')),
),
StyledWidget(
child: persistedCounterBlock(BlocProvider.of<DataCubit>(context)),
),
const SizedBox(height: 8),
const StyledWidget(
StyledWidget(
borderRadius: 0,
borderWidth: 12,
// depth: 8,
lowerColor: Colors.red,
upperColor: Colors.yellow,
child: Center(child: Text('custom 1')),
child: testBlocConsumer(),
),
const SizedBox(height: 8),
const StyledWidget(
StyledWidget(
borderRadius: 10,
borderWidth: 20,
borderWidth: 30,
depth: 20,
lowerColor: Colors.blueGrey,
upperColor: Colors.blue,
child: Center(child: Text('custom 2')),
child: testBlocBuilder(),
),
const SizedBox(height: 8),
fakeApiCall(),
const SizedBox(height: 8),
const AppHeader(text: 'BOTTOM'),
const SizedBox(height: 8),
],
),
);
......
......@@ -4,9 +4,9 @@ class StyledWidget extends StatelessWidget {
const StyledWidget({
super.key,
required this.child,
this.borderWidth = 10,
this.borderRadius = 4,
this.depth = 5,
this.borderWidth = 20,
this.borderRadius = 6,
this.depth = 7,
this.lowerColor,
this.upperColor,
});
......@@ -59,8 +59,8 @@ class StyledWidget extends StatelessWidget {
return nestedContainers(
child: child,
containerDepth: depth,
lowerColor: lowerColor ?? Theme.of(context).colorScheme.onPrimary,
upperColor: upperColor ?? Theme.of(context).colorScheme.onSecondary,
lowerColor: lowerColor ?? Theme.of(context).colorScheme.surface,
upperColor: upperColor ?? Theme.of(context).colorScheme.onSurface,
);
}
}
......@@ -3,7 +3,7 @@ description: A random application, for testing purpose only.
publish_to: "none"
version: 1.0.54+55
version: 1.0.55+56
environment:
sdk: "^3.0.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment