Skip to content

Instantly share code, notes, and snippets.

@harsha509
Created July 16, 2021 05:05
Show Gist options
  • Save harsha509/e690dd2c72f1f5c5785be4c8a47c87fd to your computer and use it in GitHub Desktop.
Save harsha509/e690dd2c72f1f5c5785be4c8a47c87fd to your computer and use it in GitHub Desktop.
{{< tabpane >}}
{{< tab header="Java" >}}
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
{{< /tab >}}
{{< tab header="Python" >}}
print("Hello World!")
{{< /tab >}}
{{< tab header="Ruby" >}}
puts "Hello World!"
{{< /tab >}}
{{< /tabpane >}}
@mbangojej
Copy link

import 'package:flutter/material.dart';

class DesignPreferenceScreen extends StatefulWidget {
@OverRide
_DesignPreferenceScreenState createState() => _DesignPreferenceScreenState();
}

class _DesignPreferenceScreenState extends State {
String selectedOption = 'Embroidery'; // Default selection

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Select Design Preference'),
),
body: Center(
child: DropdownButton(
value: selectedOption,
onChanged: (String? newValue) {
setState(() {
selectedOption = newValue!;
// TODO: Add additional code to handle the selection change
});
},
items: ['Embroidery', 'Direct-to-Film', 'Direct-to-Garment', 'Patches']
.map<DropdownMenuItem>((String value) {
return DropdownMenuItem(
value: value,
child: Text(value),
);
}).toList(),
),
),
);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment