cognition_package 1.2.1 cognition_package: ^1.2.1 copied to clipboard
A Flutter framework for cognitive testing. Contains 14 pre-defined cognitive tests and an API for creating your own.
import 'package:flutter/material.dart';
import 'package:cognition_package_demo_app/user_demographics_page.dart';
Future main() async => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
title: 'Cognition Package Demo',
home: MyHomePage(),
debugShowCheckedModeBanner: false,
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool fireBase = false;
bool buttonReady = true;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xff003F6E),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(height: 50),
Padding(
padding: const EdgeInsets.all(22.0),
child: Image.asset(
"assets/images/mcat-logo.png",
height: 80,
),
),
Padding(
padding:
const EdgeInsets.symmetric(vertical: 20, horizontal: 25),
child: Column(
children: <Widget>[
Text(
"Welcome to the demo of the Cognitive Package, developed by the Copenhagen Center for Health Technology.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: Colors.white),
),
Container(height: 5),
Text(
"If you have any questions feel free to contact us at",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: Colors.white),
),
Container(height: 5),
Text(
"cph_cachet@gmail.com",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.white,
decoration: TextDecoration.underline),
),
//Container(height: 50),
],
)),
Padding(
padding: const EdgeInsets.only(top: 50),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xffC32C39),
fixedSize: const Size(300, 60),
),
child: Text(
"Get started",
style: TextStyle(fontSize: 18),
),
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => UserDemographicsPage()));
},
),
),
],
),
),
bottomNavigationBar: SafeArea(
child: Padding(
padding: const EdgeInsets.all(22.0),
child: Image.asset(
"assets/images/Cachet-logo-white.png",
height: 50,
),
)),
);
}
}