Skip to content

Instantly share code, notes, and snippets.

@prodhan
Created March 16, 2021 12:27
Show Gist options
  • Save prodhan/1fcb69cb9a6c23a91684697b1955cf5b to your computer and use it in GitHub Desktop.
Save prodhan/1fcb69cb9a6c23a91684697b1955cf5b to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatefulWidget {
@override
_MyWidgetState createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
String _educationLevelName = "H.S.C or Equivalent";
int examinationNameID = 8;
@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: [
Visibility(
visible: (_educationLevelName == "H.S.C or Equivalent" &&
examinationNameID !=
8) || //<<================== HSC Diploma Engineering
(_educationLevelName == "S.S.C or Equivalent" &&
examinationNameID !=
3) || //<<================== SSC Vocational
(_educationLevelName == "H.S.C or Equivalent" &&
examinationNameID !=
11) //<<================== HSC Diploma Pharmecy
? true
: false,
child: Container(
child: Text("Hello, world"))
),
]),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment