Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Improved for Linux Foundation Screen #185

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .gradle/8.0.2/checksums/checksums.lock
Binary file not shown.
Binary file removed .gradle/8.0.2/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle/8.0.2/fileHashes/fileHashes.lock
Binary file not shown.
Empty file removed .gradle/8.0.2/gc.properties
Empty file.
Binary file removed .gradle/8.1.1/checksums/checksums.lock
Binary file not shown.
Binary file removed .gradle/8.1.1/checksums/md5-checksums.bin
Binary file not shown.
Binary file removed .gradle/8.1.1/checksums/sha1-checksums.bin
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed .gradle/8.1.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file removed .gradle/8.1.1/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle/8.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file removed .gradle/8.1.1/gc.properties
Empty file.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
4 changes: 2 additions & 2 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Wed May 29 23:39:38 IST 2024
gradle.version=8.4
#Wed Jun 05 15:40:00 IST 2024
gradle.version=8.2
2 changes: 1 addition & 1 deletion lib/programs screen/linux_foundation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class _LinuxFoundationState extends State<LinuxFoundation> {
return RefreshIndicator(
onRefresh: _refresh,
child: Scaffold(
appBar: AppBar(title: const Text('OpSo'), actions: <Widget>[
appBar: AppBar(title: const Text('Linux Foundation'), actions: <Widget>[
IconButton(
icon: (isBookmarked)
? const Icon(Icons.bookmark_add_rounded)
Expand Down
87 changes: 55 additions & 32 deletions lib/widgets/linux_foundation_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,77 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:opso/modals/linux_foundation_modal.dart';
import 'package:url_launcher/url_launcher.dart';


class LinuxFoundationWidget extends StatelessWidget {
final LinuxFoundationModal modal;
final double height;
final double width;
const LinuxFoundationWidget(
{super.key, required this.modal, this.height = 100, this.width = 100});


@override
Widget build(BuildContext context) {
bool isDarkMode = Theme.of(context).brightness == Brightness.dark;


return GestureDetector(
onTap: () => launchUrl(Uri.parse(modal.projectUrl)),
child: Container(
constraints: BoxConstraints(
minHeight: height,
child: Card(
elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
width: width,
decoration: BoxDecoration(
color: const Color.fromARGB(255, 153, 152, 152),
borderRadius: BorderRadius.circular(20)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// const SizedBox(height: 20),
SvgPicture.network(
modal.imageUrl,
fit: BoxFit.fitWidth,
height: 60,
placeholderBuilder: (context) =>
const CircularProgressIndicator(),
),
const SizedBox(height: 10),
Text(
modal.name,
style: const TextStyle(
fontSize: 18,
color: Color.fromARGB(255, 190, 200, 221),
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
decorationColor: Color.fromARGB(255, 190, 200, 221),
child: Container(
width: width,
constraints: BoxConstraints(minHeight: height),
decoration: BoxDecoration(
color: isDarkMode
? const Color.fromARGB(255, 48, 48, 48)
: const Color.fromARGB(255, 255, 255, 255),
border: Border.all(
color: isDarkMode ? Colors.orange.shade100 : Colors.orange.shade300,
width: 1,
),
borderRadius: BorderRadius.circular(20),
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
modal.imageUrl == ""
? SvgPicture.asset(
'assets/logo.png',
fit: BoxFit.fitWidth,
height: 60,
)
:
SvgPicture.network(
modal.imageUrl,
fit: BoxFit.fitWidth,
height: 60,
placeholderBuilder: (context) => const CircularProgressIndicator(),
),
const SizedBox(height: 10),
Text(
modal.name,
style: TextStyle(
fontSize: 20,
color: Colors.orange,
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
decorationColor: Colors.orange,
),
textAlign: TextAlign.center,
),
textAlign: TextAlign.center,
),
],
const SizedBox(height: 10),
],
),
),
),
),
);
}
}

4 changes: 2 additions & 2 deletions local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Wed May 29 23:39:41 IST 2024
sdk.dir=C\:\\Users\\Lenovo\\AppData\\Local\\Android\\Sdk
#Wed Jun 05 15:40:42 IST 2024
sdk.dir=/Users/saumya28/Library/Android/sdk
Loading