Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@
<true/>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIRequiresFullScreen</key>
<true/>
</dict>
</plist>
49 changes: 37 additions & 12 deletions lib/view/instruments_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -310,18 +310,43 @@ class _InstrumentsScreenState extends State<InstrumentsScreen> {
)
: ScrollConfiguration(
behavior: const ScrollBehavior(),
child: ListView.builder(
itemCount: _filteredIndices.length,
itemBuilder: (context, index) {
final int originalIndex = _filteredIndices[index];
return GestureDetector(
onTap: () => _onItemTapped(originalIndex),
child: ApplicationsListItem(
heading: instrumentHeadings[originalIndex],
description: instrumentDesc[originalIndex],
instrumentIcon: instrumentIcons[originalIndex],
),
);
child: LayoutBuilder(
builder: (context, constraints) {
return constraints.maxWidth < constraints.maxHeight
? ListView.builder(
itemCount: _filteredIndices.length,
itemBuilder: (context, index) {
final int originalIndex = _filteredIndices[index];
return GestureDetector(
onTap: () => _onItemTapped(originalIndex),
child: ApplicationsListItem(
heading: instrumentHeadings[originalIndex],
description: instrumentDesc[originalIndex],
instrumentIcon:
instrumentIcons[originalIndex],
),
);
},
)
: GridView.builder(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 2.5,
),
itemBuilder: (context, index) {
final int originalIndex = _filteredIndices[index];
return GestureDetector(
onTap: () => _onItemTapped(originalIndex),
child: ApplicationsListItem(
heading: instrumentHeadings[originalIndex],
description: instrumentDesc[originalIndex],
instrumentIcon:
instrumentIcons[originalIndex],
),
);
},
);
},
),
),
Expand Down
366 changes: 196 additions & 170 deletions lib/view/multimeter_screen.dart

Large diffs are not rendered by default.

129 changes: 69 additions & 60 deletions lib/view/oscilloscope_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,72 +119,81 @@ class _OscilloscopeScreenState extends State<OscilloscopeScreen> {
title: appLocalizations.oscilloscope,
body: SafeArea(
minimum: const EdgeInsets.only(right: 0, bottom: 0),
child: Container(
margin: const EdgeInsets.only(left: 5, top: 5),
child: Row(
children: [
Expanded(
flex: 87,
child: Container(
margin: const EdgeInsets.only(right: 5),
child: Stack(
children: [
Column(
child: LayoutBuilder(
builder: (context, constraints) {
return Container(
margin: const EdgeInsets.only(left: 5, top: 5),
child: Row(
children: [
Expanded(
flex: 87,
child: Container(
margin: const EdgeInsets.only(right: 5),
child: Stack(
children: [
Expanded(
flex: 66,
child: Container(
padding:
const EdgeInsets.only(bottom: 20),
color: Colors.black,
child: const OscilloscopeGraph(),
),
),
Expanded(
flex: 34,
child: Selector<OscilloscopeStateProvider,
int>(
selector: (context, provider) =>
provider.selectedIndex,
builder: (context, selectedIndex, _) {
switch (selectedIndex) {
case 0:
return const ChannelParametersWidget();
case 1:
return const TimebaseTriggerWidget();
case 2:
return const DataAnalysisWidget();
case 3:
return const XYPlotWidget();
default:
return const ChannelParametersWidget();
}
},
),
Column(
children: [
Expanded(
flex: constraints.maxHeight < 600
? 66
: 80,
child: Container(
padding: const EdgeInsets.only(
bottom: 20),
color: Colors.black,
child: const OscilloscopeGraph(),
),
),
Expanded(
flex: constraints.maxHeight < 600
? 34
: 20,
child: Selector<
OscilloscopeStateProvider, int>(
selector: (context, provider) =>
provider.selectedIndex,
builder:
(context, selectedIndex, _) {
switch (selectedIndex) {
case 0:
return const ChannelParametersWidget();
case 1:
return const TimebaseTriggerWidget();
case 2:
return const DataAnalysisWidget();
case 3:
return const XYPlotWidget();
default:
return const ChannelParametersWidget();
}
},
),
),
],
),
provider.isMeasurementsChecked
? Positioned(
right: 0,
top: 0,
child: SizedBox(
width: 135,
child: MeasurementsList(
dataParamsChannels: provider
.dataParamsChannels)),
)
: const SizedBox.shrink(),
],
),
provider.isMeasurementsChecked
? Positioned(
right: 0,
top: 0,
child: SizedBox(
width: 135,
child: MeasurementsList(
dataParamsChannels: provider
.dataParamsChannels)),
)
: const SizedBox.shrink(),
],
),
),
),
const Expanded(
flex: 13,
child: OscilloscopeScreenTabs(),
)
],
),
const Expanded(
flex: 13,
child: OscilloscopeScreenTabs(),
)
],
),
);
},
),
),
actions: [
Expand Down
Loading
Loading