From 4e9f76c2a1c93ff20ee5b38181658dbcd21773c8 Mon Sep 17 00:00:00 2001 From: Anashuman Singh Date: Wed, 23 Jul 2025 21:44:36 +0530 Subject: [PATCH 1/3] feat: added Wave Generator screen --- lib/l10n/app_localizations_en.dart | 1 + lib/main.dart | 2 ++ lib/view/instruments_screen.dart | 11 +++++++++++ lib/view/wave_generator_screen.dart | 19 +++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 lib/view/wave_generator_screen.dart diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 2a05bbfda..05c293416 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -1084,6 +1084,7 @@ class AppLocalizationsEn extends AppLocalizations { @override String get fileDeleted => 'File deleted'; + @override String get soundmeterConfig => 'Soundmeter Configurations'; @override diff --git a/lib/main.dart b/lib/main.dart index 0b8cd90ae..f5e6e0a69 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,6 +20,7 @@ import 'package:pslab/view/about_us_screen.dart'; import 'package:pslab/view/software_licenses_screen.dart'; import 'package:pslab/theme/app_theme.dart'; import 'package:pslab/view/soundmeter_screen.dart'; +import 'package:pslab/view/wave_generator_screen.dart'; import 'constants.dart'; void main() { @@ -60,6 +61,7 @@ class MyApp extends StatelessWidget { '/': (context) => const InstrumentsScreen(), '/oscilloscope': (context) => const OscilloscopeScreen(), '/multimeter': (context) => const MultimeterScreen(), + '/waveGenerator': (context) => const WaveGeneratorScreen(), '/logicAnalyzer': (context) => const LogicAnalyzerScreen(), '/powerSource': (context) => const PowerSourceScreen(), '/connectDevice': (context) => const ConnectDeviceScreen(), diff --git a/lib/view/instruments_screen.dart b/lib/view/instruments_screen.dart index 3f8e4d564..660a8885c 100644 --- a/lib/view/instruments_screen.dart +++ b/lib/view/instruments_screen.dart @@ -141,6 +141,17 @@ class _InstrumentsScreenState extends State { ); } break; + case 4: + if (Navigator.canPop(context) && + ModalRoute.of(context)?.settings.name == '/waveGenerator') { + Navigator.popUntil(context, ModalRoute.withName('/waveGenerator')); + } else { + Navigator.pushNamedAndRemoveUntil( + context, + '/waveGenerator', + (route) => route.isFirst, + ); + } default: break; } diff --git a/lib/view/wave_generator_screen.dart b/lib/view/wave_generator_screen.dart new file mode 100644 index 000000000..bd90885f0 --- /dev/null +++ b/lib/view/wave_generator_screen.dart @@ -0,0 +1,19 @@ +import 'package:flutter/widgets.dart'; +import 'package:pslab/view/widgets/common_scaffold_widget.dart'; + +class WaveGeneratorScreen extends StatefulWidget { + const WaveGeneratorScreen({super.key}); + + @override + State createState() => _WaveGeneratorScreenState(); +} + +class _WaveGeneratorScreenState extends State { + @override + Widget build(BuildContext context) { + return CommonScaffold( + title: 'Wave Generator', + body: Container(), + ); + } +} From a266e0d03537c48e74afe58e4d26107e4523ed9a Mon Sep 17 00:00:00 2001 From: Anashuman Singh Date: Sat, 9 Aug 2025 20:04:03 +0530 Subject: [PATCH 2/3] feat: added layout --- assets/icons/ic_sin.png | Bin 0 -> 1025 bytes assets/icons/ic_triangular.png | Bin 0 -> 1112 bytes lib/l10n/app_en.arb | 12 ++ lib/l10n/app_localizations.dart | 72 +++++++ lib/l10n/app_localizations_en.dart | 36 ++++ lib/view/wave_generator_screen.dart | 104 ++++++++- .../widgets/analog_waveform_controls.dart | 178 ++++++++++++++++ .../widgets/digital_waveform_controls.dart | 200 ++++++++++++++++++ lib/view/widgets/wave_generator_graph.dart | 92 ++++++++ .../widgets/wave_generator_main_controls.dart | 174 +++++++++++++++ 10 files changed, 866 insertions(+), 2 deletions(-) create mode 100644 assets/icons/ic_sin.png create mode 100644 assets/icons/ic_triangular.png create mode 100644 lib/view/widgets/analog_waveform_controls.dart create mode 100644 lib/view/widgets/digital_waveform_controls.dart create mode 100644 lib/view/widgets/wave_generator_graph.dart create mode 100644 lib/view/widgets/wave_generator_main_controls.dart diff --git a/assets/icons/ic_sin.png b/assets/icons/ic_sin.png new file mode 100644 index 0000000000000000000000000000000000000000..a83232725eae7b444ef36123a29fc1b580002490 GIT binary patch literal 1025 zcmV+c1pfPpP)juOyBrS(QeUj8s<;vx2QpsK}Y?WpCPIfjQ~@>iLQ#ai{e`9=XU)& z^Yed1^-O}l1eAk%KPI}7>?W&zr#~}h{OvDM1)cTY>AVBxH;J-5mae1v%6E?OfgO@J z^X`H&qRh|qS;CHp{u<-l6V0L1?#9)D^3mz#$_Ha*i8{bcs;AS~u*G^oCcR-L2kQ*XROhDo>l)cq96?E(ujFhc-kUKU0@H^CBpj0WY?Rb~t6rMQ|QGcQ_OAcc=y5q2HDS4p7 z3D|E_DSQA7Xo&DWWX4u|V%at&pc0jUAhy9h#BK$#TWwp5s5QZBU_|K*#8u^Qt&I!9 z;~)WTA;;VUV)od&CzS^dbg5drJfwK)0n{^)fU=mafG2WF9U;Xk2eH(eWP!~ICDFo8c6Nd>2k167Y>DVQ zFsvob@oHS&-q}UB-A&u-V%lM!Lc-|^b3OHpzGO4cm3@X4JCOW`LRA)IiZ`PFD{=~<7}d<{*zFaBne(M z6!sSP|DJ@^qDN_(uXa|~)5Ym0AxCt=<=thZ5&e!@A>9i$5e1?HNoIuFMZF+eMYjkc vgb+dqA%qY@2qApAze_q5!7RW`4Ccunh}Z*5=aGws9h|&8a-8B z=%QWcKiNL8KbnTU=ex~0^ObACdhlyz&ez(bNPuF5;X|`~*J|YoU-`@ym#>1o0DmOe}^{cEm3r4uy!HU@vhg6tnO99{(Kt%;dpQ zsOHA^JBfY5=bwoip4Z`&;LIKbpWKn=U#QA`rzlfJiag^@3o3HWT^M$w>il*=TuZ0%RX+@%_RKo~Px((|;ik=sVW9UhfYJV!b0)X7Suw;8zOl2VI>b*)3G(jIcS#Co=e}K7iMXDgky9o`$hFRSb!tkKzc3)t02A= z#JQ7+?}v<2OdJ=+c}857L*m!+#PD1dU|8AbskHQ;n^E#0KL^Aw4K5m74C)EKzt7@$ zOulp7i854Oixfa3|@_fHJh1-Kif?`w>-_6||0`7I8*n+W z{;noY31SS|*e^0c&l`fl@g6SPL&n@6d>8ECM3i>GwkP@i?4o~d%4du`;eGPX2z!uL zr4ek-TkPOG7*X<|Jc8$M6@1?;0IuOx=^v3cDE+};HX_lzE8+X8i*-=Q12a=kXOai( z`~8aVcT@5Jf{c0!}O%XZ-f#>*a(LD;iukOmbaY 'ANALYZE'; + @override + String get analog => 'Analog'; + + @override + String get digital => 'Digital'; + + @override + String get wave1 => 'Wave 1'; + + @override + String get wave2 => 'Wave 2'; + + @override + String get sqr1 => 'sqr1'; + + @override + String get sqr2 => 'sqr2'; + + @override + String get sqr3 => 'sqr3'; + + @override + String get sqr4 => 'sqr4'; + + @override + String get freq => 'Freq'; + + @override + String get phase => 'Phase'; + + @override + String get duty => 'Duty'; + + @override + String get produceSound => 'Produce Sound'; + @override String get settings => 'Settings'; diff --git a/lib/view/wave_generator_screen.dart b/lib/view/wave_generator_screen.dart index bd90885f0..eaa72f7f9 100644 --- a/lib/view/wave_generator_screen.dart +++ b/lib/view/wave_generator_screen.dart @@ -1,5 +1,11 @@ -import 'package:flutter/widgets.dart'; +import 'package:flutter/material.dart'; +import 'package:pslab/l10n/app_localizations.dart'; +import 'package:pslab/providers/locator.dart'; +import 'package:pslab/theme/colors.dart'; import 'package:pslab/view/widgets/common_scaffold_widget.dart'; +import 'package:pslab/view/widgets/analog_waveform_controls.dart'; +import 'package:pslab/view/widgets/wave_generator_graph.dart'; +import 'package:pslab/view/widgets/wave_generator_main_controls.dart'; class WaveGeneratorScreen extends StatefulWidget { const WaveGeneratorScreen({super.key}); @@ -9,11 +15,105 @@ class WaveGeneratorScreen extends StatefulWidget { } class _WaveGeneratorScreenState extends State { + AppLocalizations appLocalizations = getIt.get(); @override Widget build(BuildContext context) { return CommonScaffold( title: 'Wave Generator', - body: Container(), + body: Container( + margin: const EdgeInsets.all(8.0), + child: Column( + children: [ + Expanded( + flex: 30, + child: Container( + color: chartBackgroundColor, + child: WaveGeneratorGraph(), + ), + ), + Expanded( + flex: 30, + child: Column( + children: [ + Expanded( + flex: 70, + child: AnalogWaveformControls(), + ), + Expanded( + flex: 30, + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.produceSound, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.analog, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.digital, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + ], + ), + ), + ], + ), + ), + Expanded( + flex: 40, + child: WaveGeneratorMainControls(), + ), + ], + ), + ), ); } } diff --git a/lib/view/widgets/analog_waveform_controls.dart b/lib/view/widgets/analog_waveform_controls.dart new file mode 100644 index 000000000..629c1b543 --- /dev/null +++ b/lib/view/widgets/analog_waveform_controls.dart @@ -0,0 +1,178 @@ +import 'package:flutter/material.dart'; +import 'package:pslab/l10n/app_localizations.dart'; +import 'package:pslab/providers/locator.dart'; +import 'package:pslab/theme/colors.dart'; + +class AnalogWaveformControls extends StatefulWidget { + const AnalogWaveformControls({super.key}); + + @override + State createState() => _AnalogWaveformControlsState(); +} + +class _AnalogWaveformControlsState extends State { + AppLocalizations appLocalizations = getIt.get(); + String iconSin = "assets/icons/ic_sin.png"; + String iconTriangular = "assets/icons/ic_triangular.png"; + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Container( + margin: const EdgeInsets.only(top: 8, bottom: 5), + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all(width: 3, color: primaryRed), + borderRadius: BorderRadius.circular(10), + ), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.wave1, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.wave2, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + ], + ), + IntrinsicHeight( + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 35, + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.freq, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + flex: 35, + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.phase, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + flex: 15, + child: IconButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + icon: Image.asset( + iconSin, + color: Colors.white, + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + flex: 15, + child: IconButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + icon: Image.asset( + iconTriangular, + color: Colors.white, + ), + onPressed: () => {}, + ), + ), + ], + ), + ), + ], + ), + ), + Positioned( + left: 0, + right: 0, + top: 0, + child: Align( + alignment: Alignment.center, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 2), + decoration: BoxDecoration(color: oscilloscopeOptionTitleBoxColor), + child: Text( + appLocalizations.analog, + style: TextStyle( + color: oscilloscopeOptionTitleColor, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.bold, + fontSize: 13, + ), + ), + ), + ), + ) + ], + ); + } +} diff --git a/lib/view/widgets/digital_waveform_controls.dart b/lib/view/widgets/digital_waveform_controls.dart new file mode 100644 index 000000000..e16cb77a7 --- /dev/null +++ b/lib/view/widgets/digital_waveform_controls.dart @@ -0,0 +1,200 @@ +import 'package:flutter/material.dart'; +import 'package:pslab/l10n/app_localizations.dart'; +import 'package:pslab/providers/locator.dart'; +import 'package:pslab/theme/colors.dart'; + +class DigitalWaveformControls extends StatefulWidget { + const DigitalWaveformControls({super.key}); + + @override + State createState() => _DigitalWaveformControlsState(); +} + +class _DigitalWaveformControlsState extends State { + AppLocalizations appLocalizations = getIt.get(); + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Container( + margin: const EdgeInsets.only(top: 8, bottom: 5), + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all(width: 3, color: primaryRed), + borderRadius: BorderRadius.circular(10), + ), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.sqr1.toUpperCase(), + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.sqr2.toUpperCase(), + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.sqr3.toUpperCase(), + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.sqr4.toUpperCase(), + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + ], + ), + IntrinsicHeight( + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + flex: 35, + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.freq, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + flex: 35, + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.phase, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + const SizedBox(width: 4), + Expanded( + flex: 35, + child: TextButton( + style: TextButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: Text( + appLocalizations.duty, + style: TextStyle( + color: Colors.white, + fontSize: 14, + ), + ), + onPressed: () => {}, + ), + ), + ], + ), + ), + ], + ), + ), + Positioned( + left: 0, + right: 0, + top: 0, + child: Align( + alignment: Alignment.center, + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 2), + decoration: BoxDecoration(color: oscilloscopeOptionTitleBoxColor), + child: Text( + appLocalizations.digital, + style: TextStyle( + color: oscilloscopeOptionTitleColor, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.bold, + fontSize: 13, + ), + ), + ), + ), + ) + ], + ); + } +} diff --git a/lib/view/widgets/wave_generator_graph.dart b/lib/view/widgets/wave_generator_graph.dart new file mode 100644 index 000000000..3f8672416 --- /dev/null +++ b/lib/view/widgets/wave_generator_graph.dart @@ -0,0 +1,92 @@ +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:pslab/theme/colors.dart'; + +class WaveGeneratorGraph extends StatefulWidget { + const WaveGeneratorGraph({super.key}); + @override + State createState() => _WaveGeneratorGraphState(); +} + +class _WaveGeneratorGraphState extends State { + Widget topTitleWidgets(double value, TitleMeta meta) { + final style = TextStyle( + color: chartTextColor, + fontSize: 9, + ); + return SideTitleWidget( + meta: meta, + child: Text( + maxLines: 1, + meta.formattedValue, + style: style, + ), + ); + } + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: LineChart( + LineChartData( + backgroundColor: chartBackgroundColor, + titlesData: FlTitlesData( + show: true, + topTitles: AxisTitles( + sideTitles: SideTitles( + interval: 1000.0, + reservedSize: 20, + showTitles: true, + getTitlesWidget: topTitleWidgets, + ), + ), + bottomTitles: const AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + rightTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + ), + ), + ), + gridData: FlGridData( + show: true, + horizontalInterval: 1.0, + drawHorizontalLine: true, + drawVerticalLine: true, + ), + borderData: FlBorderData( + show: true, + border: Border( + bottom: BorderSide( + color: chartBorderColor, + ), + left: BorderSide( + color: chartBorderColor, + ), + top: BorderSide( + color: chartBorderColor, + ), + right: BorderSide( + color: chartBorderColor, + ), + ), + ), + clipData: const FlClipData.all(), + maxY: 5.0, + minY: -5.0, + maxX: 5000.0, + minX: 0.0, + ), + ), + ); + } +} diff --git a/lib/view/widgets/wave_generator_main_controls.dart b/lib/view/widgets/wave_generator_main_controls.dart new file mode 100644 index 000000000..f3f3179f3 --- /dev/null +++ b/lib/view/widgets/wave_generator_main_controls.dart @@ -0,0 +1,174 @@ +import 'package:flutter/material.dart'; +import 'package:pslab/theme/colors.dart'; + +class WaveGeneratorMainControls extends StatefulWidget { + const WaveGeneratorMainControls({super.key}); + + @override + State createState() => _WaveGeneratorMainControlsState(); +} + +class _WaveGeneratorMainControlsState extends State { + String iconSin = "assets/icons/ic_sin.png"; + String iconTriangular = "assets/icons/ic_triangular.png"; + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + flex: 75, + child: Container( + margin: const EdgeInsets.only(top: 4), + color: Colors.black, + child: Column( + children: [ + Expanded( + flex: 80, + child: IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 20, + child: Container( + margin: const EdgeInsets.only(left: 8), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + iconSin, + height: 40, + width: 40, + ), + Text( + 'Sine', + style: TextStyle( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), + const VerticalDivider(), + Expanded( + flex: 80, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Frequency:', + style: TextStyle( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.bold, + ), + ), + Text( + 'Phase:', + style: TextStyle( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ], + ), + ), + ), + Transform.translate( + offset: const Offset(0, -8), + child: const Divider(), + ), + Expanded( + flex: 20, + child: Transform.translate( + offset: const Offset(0, -8), + child: Container( + margin: const EdgeInsets.only( + left: 32, + ), + alignment: Alignment.centerLeft, + child: Text( + 'Phase Offset:', + style: TextStyle( + color: Colors.deepOrange, + fontSize: 16, + ), + ), + ), + ), + ), + ], + ), + ), + ), + Expanded( + flex: 25, + child: Container( + margin: const EdgeInsets.only( + bottom: 16, + ), + child: Row( + children: [ + SizedBox( + height: 35, + width: 30, + child: IconButton.filled( + padding: EdgeInsets.zero, + icon: Icon(Icons.chevron_left), + onPressed: () async {}, + style: IconButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), + ), + ), + ), + Expanded( + child: SliderTheme( + data: SliderThemeData( + inactiveTrackColor: sliderInActiveColor, + trackHeight: 1, + thumbShape: + const RoundSliderThumbShape(enabledThumbRadius: 6), + ), + child: Slider( + activeColor: primaryRed, + min: 0, + max: 5000, + value: 0, + onChanged: (value) {}, + ), + ), + ), + SizedBox( + height: 35, + width: 30, + child: IconButton.filled( + padding: EdgeInsets.zero, + icon: Icon(Icons.chevron_right), + onPressed: () async {}, + style: IconButton.styleFrom( + backgroundColor: primaryRed, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), + ), + ), + ), + ], + ), + ), + ), + ], + ); + } +} From 2f82651379944a0ec241b811ec04ce6782c6b78d Mon Sep 17 00:00:00 2001 From: Anashuman Singh Date: Sat, 9 Aug 2025 20:07:27 +0530 Subject: [PATCH 3/3] added l10n --- lib/l10n/app_localizations.dart | 12 ++++++------ lib/l10n/app_localizations_en.dart | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 1d1f6d088..f5dc42539 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -688,12 +688,6 @@ abstract class AppLocalizations { /// **'PCS'** String get pinPCS; - /// No description provided for @analyze. - /// - /// In en, this message translates to: - /// **'Analyze'** - String get analyze; - /// No description provided for @analog. /// /// In en, this message translates to: @@ -766,6 +760,12 @@ abstract class AppLocalizations { /// **'Produce Sound'** String get produceSound; + /// No description provided for @analyze. + /// + /// In en, this message translates to: + /// **'Analyze'** + String get analyze; + /// No description provided for @settings. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 584816f72..22b69ef2c 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -316,9 +316,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get pinPCS => 'PCS'; - @override - String get analyze => 'Analyze'; - @override String get analog => 'Analog'; @@ -355,6 +352,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get produceSound => 'Produce Sound'; + @override + String get analyze => 'Analyze'; + @override String get settings => 'Settings';