Skip to content

Commit 74829c6

Browse files
Merge pull request #16 from StabilityNexus/organisationsPage
Organisations page
2 parents d996fc6 + e5ceb55 commit 74829c6

23 files changed

Lines changed: 1224 additions & 218 deletions

.env.stencil

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
WALLETCONNECT_PROJECT_ID=<WALLETCONNECT_PROJECT_ID>
2-
API_KEY=<PINATA_API_KEY>
3-
API_SECRET=<PINATA_API_SECRET>
4-
ALCHEMY_API_KEY=<ALCHEMY_API_KEY>
5-
CONTRACT_ADDRESS=<CONTRACT_ADDRESS>
6-
APPLICATION_ID=<APPLICATION_ID>
1+
#API KEYS AND SECRETS
72

3+
API_KEY=
4+
API_SECRET=
5+
ALCHEMY_API_KEY=
86

9-
//CONTRACT ADDRESSES
7+
#APPLICATION CONFIGURATION
108

9+
APPLICATION_CHAIN_ID=
10+
WALLETCONNECT_PROJECT_ID=
1111

12-
TREE_NFT_CONTRACT_ADDRESS=<TREE_NFT_CONTRACT_ADDRESS>
13-
ORGANISATION_FACTORY_CONTRACT_ADDRESS=<ORGANISATION_FACTORY_CONTRACT_ADDRESS>
14-
CARE_TOKEN_CONTRACT_ADDRESS=<CARE_TOKEN_CONTRACT_ADDRESS>
15-
VERIFIER_TOKEN_CONTRACT_ADDRESS=<VERIFIER_TOKEN_CONTRACT_ADDRESS>
16-
LEGACY_TOKEN_CONTRACT_ADDRESS=<LEGACY_TOKEN_CONTRACT_ADDRESS>
17-
PLANTER_TOKEN_CONTRACT_ADDRESS=<PLANTER_TOKEN_CONTRACT_ADDRESS>
12+
#CONTRACT ADDRESSES
13+
14+
TREE_NFT_CONTRACT_ADDRESS=
15+
ORGANISATION_FACTORY_CONTRACT_ADDRESS=
16+
CARE_TOKEN_CONTRACT_ADDRESS=
17+
VERIFIER_TOKEN_CONTRACT_ADDRESS=
18+
LEGACY_TOKEN_CONTRACT_ADDRESS=
19+
PLANTER_TOKEN_CONTRACT_ADDRESS=

lib/main.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import 'package:tree_planting_protocol/pages/home_page.dart';
66
import 'package:tree_planting_protocol/pages/mint_nft/mint_nft_details.dart';
77
import 'package:tree_planting_protocol/pages/mint_nft/mint_nft_images.dart';
88
import 'package:tree_planting_protocol/pages/mint_nft/submit_nft_page.dart';
9+
import 'package:tree_planting_protocol/pages/organisations_pages/create_organisation.dart';
10+
import 'package:tree_planting_protocol/pages/organisations_pages/organisation_details_page.dart';
11+
import 'package:tree_planting_protocol/pages/organisations_pages/user_organisations_page.dart';
912
import 'package:tree_planting_protocol/pages/register_user_page.dart';
1013
import 'package:tree_planting_protocol/pages/settings_page.dart';
1114
import 'package:tree_planting_protocol/pages/tree_details_page.dart';
@@ -63,6 +66,30 @@ class MyApp extends StatelessWidget {
6366
return const SettingsPage();
6467
},
6568
),
69+
GoRoute(
70+
path: '/organisations',
71+
name: 'organisations_page',
72+
builder: (BuildContext context, GoRouterState state) {
73+
return const OrganisationsPage();
74+
},
75+
routes: [
76+
GoRoute(
77+
path: ':address',
78+
name: 'organisation_details',
79+
builder: (BuildContext context, GoRouterState state) {
80+
final address = state.pathParameters['address'];
81+
return OrganisationDetailsPage(organisationAddress: address!);
82+
},
83+
),
84+
],
85+
),
86+
GoRoute(
87+
path: '/create-organisation',
88+
name: 'create_organisation_page',
89+
builder: (BuildContext context, GoRouterState state) {
90+
return const CreateOrganisationPage();
91+
},
92+
),
6693
GoRoute(
6794
path: RouteConstants.mintNftPath,
6895
name: RouteConstants.mintNft,

lib/pages/mint_nft/mint_nft_coordinates.dart

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:tree_planting_protocol/utils/constants/ui/color_constants.dart';
88
import 'package:tree_planting_protocol/utils/logger.dart';
99
import 'package:tree_planting_protocol/widgets/basic_scaffold.dart';
1010
import 'package:tree_planting_protocol/widgets/map_widgets/flutter_map_widget.dart';
11-
import 'package:tree_planting_protocol/widgets/nft_display_utils/tree_nft_view_widget.dart';
1211
import 'package:tree_planting_protocol/utils/services/get_current_location.dart';
1312
import 'package:dart_geohash/dart_geohash.dart';
1413

@@ -606,44 +605,6 @@ class _MintNftCoordinatesPageState extends State<MintNftCoordinatesPage> {
606605
);
607606
}
608607

609-
// ignore: unused_element
610-
Widget _buildPreviewSection() {
611-
return Column(
612-
crossAxisAlignment: CrossAxisAlignment.start,
613-
children: [
614-
Padding(
615-
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
616-
child: Row(
617-
children: [
618-
Container(
619-
padding: const EdgeInsets.all(8),
620-
decoration: BoxDecoration(
621-
color: const Color(0xFFFAEB96),
622-
borderRadius: BorderRadius.circular(10),
623-
),
624-
child: Icon(
625-
Icons.preview,
626-
color: const Color(0xFF1CD381),
627-
size: 20,
628-
),
629-
),
630-
const SizedBox(width: 12),
631-
const Text(
632-
'Live Preview',
633-
style: TextStyle(
634-
fontSize: 18,
635-
fontWeight: FontWeight.bold,
636-
color: Color(0xFF1CD381),
637-
),
638-
),
639-
],
640-
),
641-
),
642-
const NewNFTWidget(),
643-
],
644-
);
645-
}
646-
647608
@override
648609
void dispose() {
649610
_locationTimer?.cancel();

lib/pages/mint_nft/submit_nft_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:tree_planting_protocol/utils/constants/ui/color_constants.dart';
66
import 'package:tree_planting_protocol/widgets/basic_scaffold.dart';
77
import 'package:tree_planting_protocol/widgets/nft_display_utils/tree_nft_view_details_with_map.dart';
88
import 'package:tree_planting_protocol/utils/logger.dart';
9-
import 'package:tree_planting_protocol/utils/services/contract_write_functions.dart';
9+
import 'package:tree_planting_protocol/utils/services/contract_functions/tree_nft_contract/tree_nft_contract_write_functions.dart';
1010

1111
class SubmitNFTPage extends StatefulWidget {
1212
const SubmitNFTPage({super.key});

0 commit comments

Comments
 (0)