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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _OutputState extends State<Output> with SingleTickerProviderStateMixin {

@override
void initState() {
tabController = TabController(vsync: this, length: 3);
tabController = TabController(vsync: this, length: 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miamihotline This comment is not a blocker for this PR but in the future I propose instead of hardcoding the number of tabs in the TabController, having a final variable that is an array of OutputTab widgets and using this variable to assign its length to the TabController length property and assigning this array to the tabs property of the TabBar widget. This way one could add or remove widgets in the TabBar tabs property and never have to remember to also change this number.

tabController.addListener(onTabChange);
super.initState();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:playground/modules/output/components/output_result.dart';
import 'package:playground/pages/playground/states/playground_state.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -45,7 +44,8 @@ class OutputArea extends StatelessWidget {
text: state.result?.log ?? '',
isSelected: tabController.index == 1,
),
Center(child: Text(AppLocalizations.of(context)!.graph)),
// Not supported yet
// Center(child: Text(AppLocalizations.of(context)!.graph)),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ class OutputTabs extends StatelessWidget {
isSelected: tabController.index == 1,
value: state.result?.log ?? '',
),
OutputTab(
name: appLocale.graph,
isSelected: tabController.index == 2,
value: '',
),
// Not supported yet
// OutputTab(
// name: appLocale.graph,
// isSelected: tabController.index == 2,
// value: '',
// ),
],
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef SetExample = void Function(ExampleModel example);
const kEmptyExampleName = 'Catalog';

const double kWidth = 150;
const double kHeight = 172;
const double kHeight = 137;

class SDKSelector extends StatelessWidget {
final SDK sdk;
Expand All @@ -58,7 +58,10 @@ class SDKSelector extends StatelessWidget {
createDropdown: (close) => Column(
children: [
const SizedBox(height: kMdSpacing),
...SDK.values.map((SDK value) {
// SCIO is not supported yet
...SDK.values
.where((element) => element != SDK.scio)
.map((SDK value) {
return SizedBox(
width: double.infinity,
child: Consumer<ExampleState>(
Expand Down