mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
ReadingsContainer
-> SizeRenderWidget
This commit is contained in:
parent
5bea96669d
commit
bdf03f708f
2 changed files with 7 additions and 7 deletions
|
@ -1,23 +1,23 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
|
||||||
class ReadingsContainer extends SingleChildRenderObjectWidget {
|
class SizeRenderWidget extends SingleChildRenderObjectWidget {
|
||||||
final ValueChanged<Size>? onLayout;
|
final ValueChanged<Size>? onLayout;
|
||||||
|
|
||||||
const ReadingsContainer({
|
const SizeRenderWidget({
|
||||||
super.key,
|
super.key,
|
||||||
super.child,
|
super.child,
|
||||||
this.onLayout,
|
this.onLayout,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderReadingsContainer createRenderObject(BuildContext context) => RenderReadingsContainer(onLayout: onLayout);
|
SizeRenderBox createRenderObject(BuildContext context) => SizeRenderBox(onLayout: onLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
class RenderReadingsContainer extends RenderProxyBox {
|
class SizeRenderBox extends RenderProxyBox {
|
||||||
final ValueChanged<Size>? onLayout;
|
final ValueChanged<Size>? onLayout;
|
||||||
|
|
||||||
RenderReadingsContainer({this.onLayout});
|
SizeRenderBox({this.onLayout});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void performLayout() {
|
void performLayout() {
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/platform_config.dart';
|
import 'package:lightmeter/platform_config.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/topbar/shape_topbar.dart';
|
import 'package:lightmeter/screens/metering/components/topbar/shape_topbar.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/widget_size_render.dart';
|
import 'package:lightmeter/screens/metering/components/topbar/components/widget_size_render.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
||||||
|
@ -65,7 +65,7 @@ class _MeteringTopBarState extends State<MeteringTopBar> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ReadingsContainer(
|
child: SizeRenderWidget(
|
||||||
onLayout: (size) => _onReadingsLayout(size.height),
|
onLayout: (size) => _onReadingsLayout(size.height),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
|
Loading…
Reference in a new issue