Created
March 16, 2021 12:27
-
-
Save prodhan/1fcb69cb9a6c23a91684697b1955cf5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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