Compare commits

..

No commits in common. "577801423d83860afc614584e3034cda9fca7fdc" and "02bce8318af08a342c77ecffd139f74edfa6c649" have entirely different histories.

6 changed files with 69 additions and 121 deletions

View File

@ -166,7 +166,8 @@ class _CreateBusinessDetailState extends State<BusinessDetail> {
.replaceAll('www.', ''), .replaceAll('www.', ''),
style: const TextStyle(color: Colors.blue)), style: const TextStyle(color: Colors.blue)),
onTap: () { onTap: () {
launchUrl(Uri.parse(business.website!)); launchUrl(
Uri.parse('https://${business.website}'));
}, },
), ),
], ],

View File

@ -513,7 +513,7 @@ class _BusinessHeaderState extends State<_BusinessHeader> {
IconButton( IconButton(
icon: const Icon(Icons.link), icon: const Icon(Icons.link),
onPressed: () { onPressed: () {
launchUrl(Uri.parse(business.website!)); launchUrl(Uri.parse('https://${business.website}'));
}, },
), ),
IconButton( IconButton(

View File

@ -247,7 +247,6 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
), ),
validator: (value) { validator: (value) {
if (value != null && if (value != null &&
value.isNotEmpty &&
!RegExp(r'(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(?:/[^/\s]*)*') !RegExp(r'(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(?:/[^/\s]*)*')
.hasMatch(value)) { .hasMatch(value)) {
return 'Enter a valid Website'; return 'Enter a valid Website';

View File

@ -123,7 +123,7 @@ class _CreateBusinessDetailState extends State<JobListingDetail> {
.replaceAll('www.', ''), .replaceAll('www.', ''),
style: const TextStyle(color: Colors.blue)), style: const TextStyle(color: Colors.blue)),
onTap: () { onTap: () {
launchUrl(Uri.parse(listing.link!)); launchUrl(Uri.parse('https://${listing.link!}'));
}, },
), ),
], ],

View File

@ -151,8 +151,7 @@ class _JobsOverviewState extends State<JobsOverview> {
setState(() { setState(() {
_isRetrying = true; _isRetrying = true;
}); });
await widget.updateBusinessesCallback( await widget.updateBusinessesCallback(null, null);
null, null);
} }
}, },
), ),
@ -593,7 +592,8 @@ class _JobHeaderState extends State<_JobHeader> {
IconButton( IconButton(
icon: const Icon(Icons.link), icon: const Icon(Icons.link),
onPressed: () { onPressed: () {
launchUrl(Uri.parse(business.listings![0].link!)); launchUrl(Uri.parse(
'https://${business.listings![0].link!}'));
}, },
), ),
IconButton( IconButton(

View File

@ -37,7 +37,7 @@ class _SignInPageState extends State<SignInPage> {
heightFactor: 1.0, heightFactor: 1.0,
child: Container( child: Container(
padding: const EdgeInsets.fromLTRB(12, 50, 12, 50), padding: const EdgeInsets.fromLTRB(12, 50, 12, 50),
height: 450, height: 475,
width: 500, width: 500,
child: Card( child: Card(
child: Padding( child: Padding(
@ -60,12 +60,9 @@ class _SignInPageState extends State<SignInPage> {
controller: _usernameController, controller: _usernameController,
autocorrect: false, autocorrect: false,
decoration: const InputDecoration( decoration: const InputDecoration(
prefixIcon: Padding( prefixIcon: Icon(Icons.person_outline),
padding: EdgeInsets.all(16.0),
child: Icon(Icons.person_outline),
),
labelText: 'Username', labelText: 'Username',
), border: OutlineInputBorder()),
), ),
), ),
Padding( Padding(
@ -110,13 +107,11 @@ class _SignInPageState extends State<SignInPage> {
autocorrect: false, autocorrect: false,
obscureText: obscurePassword, obscureText: obscurePassword,
decoration: InputDecoration( decoration: InputDecoration(
prefixIcon: const Padding( prefixIcon: const Icon(Icons.fingerprint),
padding: EdgeInsets.all(16.0),
child: Icon(Icons.fingerprint),
),
labelText: 'Password', labelText: 'Password',
border: const OutlineInputBorder(),
suffixIcon: Padding( suffixIcon: Padding(
padding: const EdgeInsets.only(right: 16.0), padding: const EdgeInsets.all(8.0),
child: IconButton( child: IconButton(
onPressed: () { onPressed: () {
setState(() { setState(() {
@ -136,44 +131,35 @@ class _SignInPageState extends State<SignInPage> {
errorMessage!, errorMessage!,
style: const TextStyle(color: Colors.red), style: const TextStyle(color: Colors.red),
), ),
Padding( CheckboxListTile(
padding: const EdgeInsets.only(top: 8.0), value: rememberMe,
child: FilledButton( onChanged: (value) async {
style: FilledButton.styleFrom( setState(() {
shape: const RoundedRectangleBorder( rememberMe = value!;
borderRadius: });
BorderRadius.all(Radius.circular(6)))), },
child: SizedBox( title: const Text('Remember me'),
width: 374, ),
height: 40, ElevatedButton.icon(
child: Row( style: ElevatedButton.styleFrom(
mainAxisSize: MainAxisSize.min, backgroundColor:
mainAxisAlignment: MainAxisAlignment.center, Theme.of(context).colorScheme.primary,
children: [ // padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 12.0, bottom: 12.0),
_isloading ),
? Padding( icon: _isloading
padding: EdgeInsets.only(right: 8.0), ? const SizedBox(
child: const SizedBox(
width: 20, width: 20,
height: 20, height: 20,
child: CircularProgressIndicator( child: CircularProgressIndicator(
color: Colors.white, color: Colors.white,
strokeWidth: 3, strokeWidth: 3,
)), ))
) : const Icon(Icons.done, color: Colors.white),
: const Padding( label: const Text('Sign In',
padding: EdgeInsets.only(right: 8.0), style: TextStyle(color: Colors.white)),
child: Icon(Icons.done,
color: Colors.white),
),
const Text('Sign in',
style: TextStyle(
color: Colors.white, fontSize: 18)),
],
),
),
onPressed: () async { onPressed: () async {
setState(() { setState(() {
errorMessage = null;
_isloading = true; _isloading = true;
}); });
jwt = await signIn(username, password).timeout( jwt = await signIn(username, password).timeout(
@ -203,44 +189,6 @@ class _SignInPageState extends State<SignInPage> {
} }
}, },
), ),
),
Expanded(
child: Align(
alignment: Alignment.bottomLeft,
child: Row(
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Row(
children: [
Checkbox(
value: rememberMe,
onChanged: (value) {
setState(() {
rememberMe = value!;
});
}),
const Padding(
padding: EdgeInsets.all(8.0),
child: Text('Remember me'),
)
],
),
onTap: () {
setState(() {
rememberMe = !rememberMe;
});
},
),
),
),
],
),
),
),
], ],
), ),
), ),