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

Fixed "Redox Summer of Code" is not showing full data #397

Merged
merged 2 commits into from
Oct 30, 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
59 changes: 29 additions & 30 deletions lib/programs screen/redox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RsocPage extends StatefulWidget {

class _RsocPageState extends State<RsocPage> {
List<RsocProjectModal> projects = [];
List<RsocProjectModal> allProjects =[];
List<RsocProjectModal> allProjects = [];

String currectPage = "/rsoc";
String currentProject = "RSoC";
Expand Down Expand Up @@ -76,12 +76,11 @@ class _RsocPageState extends State<RsocPage> {
onRefresh: _refresh,
child: Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios),

onPressed: () => Navigator.of(context).pop(),
),
centerTitle: true,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios),
onPressed: () => Navigator.of(context).pop(),
),
centerTitle: true,
title: const Text('Redox Summer of Code'),
actions: <Widget>[
IconButton(
Expand Down Expand Up @@ -130,8 +129,7 @@ class _RsocPageState extends State<RsocPage> {
} else if (snapshot.connectionState == ConnectionState.done) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(42),
vertical: ScreenUtil().setHeight(10),
horizontal: ScreenUtil().setWidth(42),
),
child: SingleChildScrollView(
child: Column(
Expand All @@ -144,19 +142,23 @@ class _RsocPageState extends State<RsocPage> {
suffixIcon: const Icon(Icons.search),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Color(0xFFEEEEEE)),
borderSide:
const BorderSide(color: Color(0xFFEEEEEE)),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Color(0xFFEEEEEE)),
borderSide:
const BorderSide(color: Color(0xFFEEEEEE)),
),
disabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Color(0xFFEEEEEE)),
borderSide:
const BorderSide(color: Color(0xFFEEEEEE)),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Color(0xFFEEEEEE)),
borderSide:
const BorderSide(color: Color(0xFFEEEEEE)),
),
contentPadding: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(12),
Expand All @@ -168,22 +170,19 @@ class _RsocPageState extends State<RsocPage> {
},
),
SizedBox(height: ScreenUtil().setHeight(20)),
SizedBox(
height: MediaQuery.of(context).size.height * 0.9,
child: ListView.builder(
itemCount: projects.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: RsocProjectWidget(
modal: projects[index],
height: ScreenUtil().screenHeight * 0.10,
width: ScreenUtil().screenWidth,
index: index+1,
),
);
},
),
ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: projects.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: RsocProjectWidget(
modal: projects[index],
index: index + 1,
),
);
},
),
],
),
Expand All @@ -197,4 +196,4 @@ class _RsocPageState extends State<RsocPage> {
),
);
}
}
}
6 changes: 0 additions & 6 deletions lib/widgets/rsoc_project_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ import 'package:url_launcher/url_launcher.dart';

class RsocProjectWidget extends StatelessWidget {
final RsocProjectModal modal;
final double height;
final double width;
final int index;

const RsocProjectWidget({
super.key,
required this.modal,
required this.index,
this.height = 100,
this.width = 100,
});

@override
Expand All @@ -29,8 +25,6 @@ class RsocProjectWidget extends StatelessWidget {
}
},
child: Container(
width: width,
constraints: BoxConstraints(minHeight: height),
decoration: BoxDecoration(
border: Border.all(
color: isDarkMode ? Colors.orange.shade100 : Colors.orange.shade300,
Expand Down
Loading